Setting, Disabling, and Reading the Wakeup Timer
When the Macintosh Portable computer is in the sleep state, the
Power Manager updates the real-time clock and compares it to the wakeup timer once each second. When the real-time clock and the wakeup timer have
the same setting, the power management circuits return the Macintosh
Portable to the operating state. The Power Manager provides functions that set the wakeup timer, disable the wakeup timer, and read the wakeup timer's
current setting.
Use the SetWUTime function to set the wakeup timer. You pass one parameter to the SetWUTime function: an unsigned long word specifying the number of seconds since midnight, January 1, 1904. Setting the wakeup timer
automatically enables it.
To disable the wakeup timer, you can set the wakeup timer to any time earlier
than the current setting of the real-time clock (that is, to some time in the
past), or you can use the DisableWUTime function. To reenable the wakeup timer, you must use the SetWUTime function to set the timer to a new time in the future.
To get the current setting of the wakeup timer, use the GetWUTime function. This function returns two parameters: the time to which the wakeup timer is
set (in seconds since midnight, January 1, 1904) and a flag indicating
whether the wakeup timer is enabled.
If the Macintosh Portable is already in the operating state when the real-time
clock reaches the setting in the wakeup timer, nothing happens.
The power management circuits do not return the Macintosh Portable to the
operating state while battery voltage is low, even if the wakeup timer and
real-time clock settings coincide.