Potentially up to 2 minutes and 45 seconds!
"Pressurization could have enabled consciousness for the entire fall until impact. The crew cabin hit the ocean surface at 207 mph (333 km/h) approximately two minutes and 45 seconds after breakup. The estimated deceleration was 200 g, far exceeding structural limits of the crew compartment or crew survivability levels. The mid-deck floor had not suffered buckling or tearing, as would result from a rapid decompression, but stowed equipment showed damage consistent with decompression, and debris was embedded between the two forward windows that may have caused a loss of pressure. Impact damage to the crew cabin was severe enough that it could not be determined whether the crew cabin had previously been damaged enough to lose pressurization."
"...indicating that Smith made the switch changes, presumably in a futile attempt to restore electrical power to the cockpit after the crew cabin detached from the rest of the orbiter."
https://en.m.wikipedia.org/wiki/Space_Shuttle_Challenger_dis...