Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 6 - Power Manager / Power Manager Reference
Power Manager Routines / Controlling and Reading the Wakeup Timer


SetWUTime

You can use the SetWUTime function to set the wakeup timer.

FUNCTION SetWUTime (WUTime: LongInt): OSErr;
WUTime
The time at which the wakeup timer is to wake up, specified as a number of seconds since midnight, January 1, 1904.
DESCRIPTION
The SetWUTime function sets and enables the wakeup timer. When a portable Macintosh computer is in the sleep state, the power management hardware 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 hardware returns the computer to the operating state.

The WUTime parameter specifies the time at which the power management hardware will return the computer to the operating state. You specify the time as the number of seconds since midnight, January 1, 1904.

If the computer is not in the sleep state when the wakeup timer and the real-time clock settings coincide, nothing happens. If you set the wakeup timer to a time earlier than the current setting of the real-time clock, you effectively disable the wakeup timer.

RESULT CODES
noErr0No error
SEE ALSO
See "Setting, Disabling, and Reading the Wakeup Timer," beginning on page 6-16, for an example of calling SetWUTime.

You can use the SetWakeupTimer function (page 6-45) to explicitly enable and disable the wakeup timer.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996