SLEEP(3) — UNIX Programmer’s Manual
NAME
sleep − suspend execution for interval
SYNOPSIS
int sleep(unsigned int seconds);
DESCRIPTION
The current process is suspended from execution for the number of seconds specified by the argument. The actual suspension time may be up to 1 second less than that requested, because scheduled wakeups occur at fixed 1-second intervals, and an arbitrary amount longer because of other activity in the system.
RETURNS
If the sleep function returns because the requested time has elapsed, the value returned will be zero. If the sleep function returns due to the delivery of a signal, the value returned is the requested time minus the time actually slept, in seconds.
ERRORS
[EAGAIN] A resource is temporarily unavailable.
SEE ALSO
alarm(3C), pause(2P), setitimeer(2), sigaction(2P), sigpause(2), usleep(3)
POSIX 1003.1 — August 1, 1992