[ ECLiPSe Operating System built-in.|Group Index| Full 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 uninstantaited.
(5) Type error
Seconds is not an integer.

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