Pike v8.1 release 6

Method System.sleep()


Method sleep

int sleep(int seconds)

Description

Call the system sleep() function.

This is not to be confused with the global function sleep() that does more elaborate things and can sleep with better precision (although dependant on a normal functioning system clock).

Note

The system's sleep function often utilizes the alarm(2) call and might not be perfectly thread safe in combination with simultaneous sleep()'s or alarm()'s. It might also be interrupted by other signals.

If you don't need it to be independant of the system clock, use sleep() instead.

May not be present; only exists if the function exists in the current system.

See also

sleep() usleep() nanosleep()