.sleep Method

Function:

Enters a low-power state and reboots the device at the specified date and time.

Syntax:

sys.sleep(daycount as word, mincount as word, seconds as byte)

Returns:

---

See Also:

sys.reboot, sys.reboottoapp, sys.currentpll, sys.runmode, sys.resettype, and sys.halt


Part

Description

daycount

Number of elapsed days.

mincount

Number of elapsed minutes.

seconds

Number of elapsed seconds.

Details

Only available on the WM2000.

This method will block execution of your code until the device is rebooted either manually or by the external sleep hardware (see the Programmable Hardware Manual).

When the external sleep hardware is properly attached, calling sys.sleep will cause the device to shut down and enter the low-power state. If the external sleep hardware is absent or misconfigured, calling this method will cause the device to halt — requiring that it be manually rebooted.

The external sleep hardware is scheduled to reboot the device by specifying the date and time as the number of days ( daycount), minutes ( mincount), and seconds ( seconds) since 1-JAN-2000.

If improperly configured, the device might not "wake" at the desired date and time.

Note that the device will boot to the compiled Tibbo BASIC/C application binary specified by sys.defaultapp.