10 seconds of consciousness, and 90 seconds for “minimal permanent injury”. Andrew Tarantola summarizes the actual science of What Really Happens When You Get Sucked Out of an Airlock.
Some degree of consciousness will probably be retained for 9 to 11 seconds (see chapter 2 under Hypoxia). In rapid sequence thereafter, paralysis will be followed by generalized convulsions and paralysis once again. During this time, water vapor will form rapidly in the soft tissues and somewhat less rapidly in the venous blood. This evolution of water vapor will cause marked swelling of the body to perhaps twice its normal volume unless it is restrained by a pressure suit.
— Parker and West (1973): Bioastronautics Data Book: Second Edition. NASA SP-3006.
This is a question I occasionally get from students, so it’s good know where to find the studies, even though much of the evidence comes from accidents that happened to astronauts and cosmonauts.