Manual Page Result
0
Command: sleep | Section: 3 | Source: UNIX v10 | File: sleep.3
SLEEP(3) Library Functions Manual SLEEP(3)
NAME
sleep - suspend execution for an interval
SYNOPSIS
sleep(seconds)
unsigned seconds;
DESCRIPTION
The current process is suspended from execution for the number of sec-
onds specified by the argument. The actual suspension time may be up
to one second less than that requested, because scheduled wakeups occur
at fixed second intervals, and an arbitrary amount longer because of
other activity in the system.
The routine is implemented by setting an alarm clock signal and pausing
until it occurs. The previous state of this signal is saved and re-
stored. If the sleep time exceeds the time to the alarm signal, the
process sleeps only until the signal would have occurred, and the sig-
nal is sent one second later.
SEE ALSO
alarm(2)
SLEEP(3)