.\"
.\" @(#)sleep.3 6.2 (Berkeley) 5/12/86
.\"
-.TH SLEEP 3 "May 12, 1986"
+.TH SLEEP 3 "August 16, 2009"
.UC 4
.SH NAME
sleep \- suspend execution for interval
The current process is suspended from execution for the number
of seconds specified by the argument.
.PP
-The routine is implemented by setting an alarm timer
-and pausing until it occurs.
-The previous state of this timer is saved and restored.
-If the sleep time exceeds the time to the expiration of the
-previous timer,
-the process sleeps only until the signal would have occurred, and the
-signal is sent 1 second later.
+The routine is implemented using the 'select' function, so it does not
+interfere with alarm timers. If a signal is received, the function returns.
+.SH "RETURN VALUE
+The amount of time that remains to be slept is returned. This value is
+specified in seconds and rounded up.
.SH "SEE ALSO"
-.BR alarm (2),
-.BR pause (2).
+.BR pause (2),
+.BR nanosleep (3).