*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: usleep | Section: 3 | Source: NetBSD | File: usleep.3
USLEEP(3) FreeBSD Library Functions Manual USLEEP(3) NAME usleep - suspend execution for interval of microseconds LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include <unistd.h> int usleep(useconds_t microseconds); DESCRIPTION This interface is obsoleted by nanosleep(2). The 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. RETURN VALUES On successful completion, usleep() returns 0. Otherwise, it returns -1 and sets errno to indicate the error. ERRORS The usleep() function may fail if: [EINTR] usleep was interrupted by the delivery of a signal. SEE ALSO nanosleep(2), sleep(3) STANDARDS The 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 nanosleep(2) was recommended instead. The IEEE Std 1003.1-2008 ("POSIX.1") revision removed usleep() from the specification. HISTORY The usleep() function appeared in 4.3BSD. CAVEATS In IEEE Std 1003.1-2004 ("POSIX.1"), usleep was limited to values of microseconds less than one million. Some implementations, including NetBSD before 10.1, fail immediately with EINVAL -- and don't sleep at all -- if microseconds is one million or greater. FreeBSD 14.1-RELEASE-p8 April 22, 2024 FreeBSD 14.1-RELEASE-p8

Navigation Options