Function Sleep() Foundation
Explicitely sets idle condition for a thread.
Sleep( <nTime> ) --> NIL
The return value of Sleep() is always NIL.
The function Sleep() defines an explicit idle condition for the thread in which the function is called. During the idle condition the thread uses no system sources (CPU time) and leaves resources available to other threads. The idle condition lasts <nTime> hundredths of a second and cannot be interrupted.
Idle conditions can also be defined with the function InKey() or AppEvent(). But with these functions a program waits until either an event takes place or until the defined time interval has passed. Neither function guarantees that the idle time interval will be completed. In addition, events can be lost when an idle condition is defined with Inkey() or AppEvent(). With Sleep() the time interval for the idle condition is guaranteed. Events which occur during the idle condition are stored in the event queue and are available after the completion of Sleep().
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.