| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
System

# Method System.usleep()

Method usleep

  `void usleep(int usec)`

Description

  Call the system usleep() 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 usleep 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() sleep() nanosleep()