It can happen quickly and there are 20 seconds to do something about it once the oxygen is depleted.
Not for the pilots they would have had advanced warning of any depresurrisation not matter how subtle via alarms in the cockpit. Also in the event of catastrophic failures the pilots are trained to recognize the advanced effects of oxygen deprivation. they have better and more advanced breathing equipment in their cockpit, so why did they die at their controls? Some theories in Europe at the moment point to faulty AC which could have being pumping toxic gases through the plane.
Isn't that basically what happened to Payne Stewart's plane?