Suspending program for a specified number of secondsΒΆ

sleep

Suspend program for a specified number of seconds


SYNTAX

sleep integer_expression

Suspends program execution for the number of seconds specified. When the time has elapsed, program execution resumes at the statement following the sleep command.

integer_expression

The number of seconds for which the program is to be suspended. This may be any expression that evaluates to an integer value.

Since many operating system clocks are only accurate to the nearest second, an error of up to one second is possible. The nap() function enables suspension in milliseconds under most systems.

The wakeup 0 command can be used to terminate the sleep command from within an event function called by pressing a hot button.


EXAMPLE

delete File3
caption "Record deleted"
sleep 3
return

RELATED TOPICS

nap()

wakeup