sleep

Definition: sleep(atom a)
Description: Suspend execution for a seconds.
Comments: The operating system will suspend your process and schedule other processes.

Fractions are allowed, like OpenEuphoria, but unlike the RDS Eu version of this procedure which only accepts whole seconds.

Negative values trigger a fatal exception. Attempts to sleep longer than about 24 days (ie 2,147,483 seconds), are expected to suffer an internal overflow and quietly malfunction, perhaps by sleeping for only 24 days even when you asked for 27.

There is no guarantee that control will not return prematurely, perhaps due to a particular keystroke or some system broadcast message, and equally there is no official way to deliberately interrupt a sleep operation - anything of that ilk would require a loop of several shorter sleeps with appropriate tests on each iteration.

With multiple tasks, the whole program sleeps, not just the current task. To avoid this, when multitasking is in use you should instead call task_delay(a).
With multiple threads, other running threads continue uninterrupted and only the calling thread sleeps. Ironically perhaps, you should note that task_delay is decidedly not thread-safe and will crash if invoked from multiple threads.
Example:
puts(1, "Waiting 15 seconds...\n")
sleep(15)
puts(1, "Done.\n")
See Also: lock_file, abort, time, task_delay