usleep(3C)
usleep - suspend execution for an interval
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME usleep - suspend execution for an interval SYNOPSIS #include <unistd.h> int usleep (useconds_t seconds); DESCRIPTION The usleep() function suspends the current thread from execution for the number of microseconds specified by the seconds argument. Because of other activity, or because of the time spent in processing the call, the actual suspension time may be longer than the amount of time specified. The seconds argument must be less than 1,000,000. If the value of seconds is 0, the call has no effect. The usleep() function uses the high resolution sleep function: nanosleep() to suspend execution of a thread. DIAGNOSTICS Upon successful completion, a 0 value is returned. Otherwise, -1 is returned and errno is set to indicate the error. If the time interval specified is 1,000,000 or more microseconds, errno is set to EINVAL and -1 is returned from usleep(). SEE ALSO nanosleep(2).