|USLEEP(3)||Library Functions Manual||USLEEP(3)|
usleep — suspend
execution for interval of microseconds
usleep() function suspends execution
of the calling process until either the number of microseconds specified by
microseconds have elapsed or a signal is delivered to
the calling process and its action is to invoke a signal catching function
or to terminate the process. The suspension time may be longer than
requested due to the scheduling of other activity by the system.
The microseconds argument must be less than 1,000,000. If the value of microseconds is 0, then the call has no effect.
On successful completion,
0. Otherwise, it returns -1 and sets errno to indicate
usleep() function may fail if:
usleep() function conforms to
X/Open Portability Guide Issue 4, Version 2
(“XPG4.2”). It later appeared in the POSIX standard,
but in IEEE Std 1003.1-2004
(“POSIX.1”) it was marked as legacy and the use of
recommended instead. The IEEE Std 1003.1-2008
(“POSIX.1”) revision removed
usleep() from the specification.
usleep() function appeared in
|April 29, 2010||NetBSD-7.0.1|