diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-10-22 11:27:20 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-10-22 11:27:20 +0000 |
| commit | 45ea5f3053e233c787d34a0441b2560736f53e96 (patch) | |
| tree | de1d9c2c9bace69d4889dad8ea546c555d579461 | |
| parent | c692d76daefbb11d8fc3c839e81193985dfd2a3f (diff) | |
Notes
| -rw-r--r-- | lib/libc/gen/usleep.3 | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/libc/gen/usleep.3 b/lib/libc/gen/usleep.3 index b5ed4e9ce292..0b03a7cff60c 100644 --- a/lib/libc/gen/usleep.3 +++ b/lib/libc/gen/usleep.3 @@ -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. |
