Reflect usleep code changes:

Limit max arg
Change return type to int
This commit is contained in:
Andrey A. Chernov 1997-10-22 11:27:20 +00:00
parent c692d76dae
commit 45ea5f3053

View File

@ -39,7 +39,7 @@
.Nd suspend execution for interval of microseconds
.Sh SYNOPSIS
.Fd #include <unistd.h>
.Ft void
.Ft int
.Fn usleep "u_int microseconds"
.Sh DESCRIPTION
The
@ -52,6 +52,10 @@ of time.
System activity or time spent in processing the
call may lengthen the sleep slightly.
.Pp
The
.Fa microseconds
argument must be less than 1000000.
.Pp
If a timer is already running on the process its state is unaltered by
this
.Fn usleep
@ -67,6 +71,25 @@ This function is implemented using
by pausing for
.Fa microseconds
of time or until any signal occurse.
.Sh RETURN VALUES
The
.Fn usleep
function returns 0 on successful completion. Otherwise, it returns -1
and sets
.Va errno
to indicate the error.
.Sh ERRORS
The
.Fn usleep
function
will fail if:
.Bl -tag -width [EINVAL]
.It Bq Er EINTR
Some signal occurse.
.It Bq Er EINVAL
The
.Fa microseconds
argument specified 1000000 or more microseconds.
.Sh NOTES
.Pp
A microsecond is 0.000001 seconds.