The sleep statement places a process to sleep for a specific number of seconds, or, until a specific time.
sleep {num.exp} sleep {"time.exp"}
rqm
num.exp | Time to sleep in seconds. |
time.exp | Time to sleep in military time format (hh:mm:ss). |
If no argument is included, the process sleeps for one second. rqm and sleep are identical.
The specification of fractional seconds in the numeric expression is allowed. Also, a numeric expression of 0 causes the process to relinquish its time slice.
This puts the process to sleep for one hour.
sleep 3600
This puts the process to sleep, leaving a wakeup call for 8:00 AM.
until.wakeup.time = "08:00" sleep until.wakeup.time