+ if (getPowerState() == ON_STATE)
+ {
+ // this is a quick wake from aborted sleep
+ if (idleSeconds && !wrangler)
+ {
+ AbsoluteTime deadline;
+ sleepASAP = false;
+ // stay awake for at least idleSeconds
+ clock_interval_to_deadline(idleSeconds, kSecondScale, &deadline);
+ thread_call_enter_delayed(extraSleepTimer, deadline);
+ // this gets turned off when we sleep again
+ idleSleepPending = true;
+ }
+ tellClients(kIOMessageSystemWillPowerOn);
+ }
+#if HIBERNATION
+ else
+ {
+ IOHibernateSystemPostWake();
+ }