Man page for new function nanosleep(3), updated man page for sleep(3)
This commit is contained in:
parent
247e1e8fa8
commit
83b84cbe64
@ -4,7 +4,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" @(#)sleep.3 6.2 (Berkeley) 5/12/86
|
.\" @(#)sleep.3 6.2 (Berkeley) 5/12/86
|
||||||
.\"
|
.\"
|
||||||
.TH SLEEP 3 "May 12, 1986"
|
.TH SLEEP 3 "August 16, 2009"
|
||||||
.UC 4
|
.UC 4
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sleep \- suspend execution for interval
|
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
|
The current process is suspended from execution for the number
|
||||||
of seconds specified by the argument.
|
of seconds specified by the argument.
|
||||||
.PP
|
.PP
|
||||||
The routine is implemented by setting an alarm timer
|
The routine is implemented using the 'select' function, so it does not
|
||||||
and pausing until it occurs.
|
interfere with alarm timers. If a signal is received, the function returns.
|
||||||
The previous state of this timer is saved and restored.
|
.SH "RETURN VALUE
|
||||||
If the sleep time exceeds the time to the expiration of the
|
The amount of time that remains to be slept is returned. This value is
|
||||||
previous timer,
|
specified in seconds and rounded up.
|
||||||
the process sleeps only until the signal would have occurred, and the
|
|
||||||
signal is sent 1 second later.
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR alarm (2),
|
.BR pause (2),
|
||||||
.BR pause (2).
|
.BR nanosleep (3).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user