.TH nap() "" "" "System Call (libc)"
.PC "Sleep briefly"
\fBlong nap(\fIinterval\^\fB)\fR
\fBlong \fIinterval\^\fB;\fR
.PP
.B nap()
sleeps for
.I interval
milliseconds, or until its process receives a signal, whichever occurs first.
.PP
If it receives no signal,
.B nap()
returns the number of milliseconds it slept.
If it received a signal, it returns \-1 and sets
.B errno
to
.BR EINTR .
.SH "See Also"
.Xr "libc," libc
.Xr "sleep()" sleep.s
.SH Notes
.B nap()
is governed by the granularity of the system clock.
Under \*(CO, the system clock ticks every ten milliseconds; thus, the
call
.B nap(1);
and the call
.B nap(9);
have the same effect.
Note that
.B nap()
is guaranteed to sleep for at least
.I interval
milliseconds; thus, the call
.B nap(11);
sleeps for two clock ticks, or 20 milliseconds.
