[ Operating System | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
sleep(+Seconds)
The execution of ECLiPSe is suspended for Seconds number of seconds.
- +Seconds
- Positive number (integer or float).
Description
sleep/1 causes the the suspension of execution of ECLiPSe for Seconds
number of seconds.
However, ECLiPSe will respond to interrupts while asleep. On most
operating systems, interrupts will terminate the sleep prematurely.
Fail Conditions
None.
Resatisfiable
No.
Exceptions
- (4) instantiation fault
- Seconds is uninstantiated.
- (5) type error
- Seconds is not an integer or float.
Examples
Success:
[eclipse]: sleep(0.3).
% short sleep
yes. % "yes" appears after 0.3 seconds.
[eclipse]: sleep(63072000).
% long sleep
yes. % "yes" appears after 2 years.
See Also
alarm / 1, pause / 0