From: Erik van der Kouwe Date: Sun, 16 Aug 2009 12:12:40 +0000 (+0000) Subject: Man page for new function nanosleep(3), updated man page for sleep(3) X-Git-Tag: v3.1.5~192 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=83b84cbe64adaac9bde05b0e57a3f719f96a5e22;p=minix.git Man page for new function nanosleep(3), updated man page for sleep(3) --- diff --git a/man/man3/sleep.3 b/man/man3/sleep.3 index 7757f2cf8..241b37233 100644 --- a/man/man3/sleep.3 +++ b/man/man3/sleep.3 @@ -4,7 +4,7 @@ .\" .\" @(#)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 @@ -19,13 +19,11 @@ unsigned int sleep(unsigned int \fIseconds\fP) 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).