.\" SUCH DAMAGE.
.\"
.\" @(#)usleep.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/usleep.3,v 1.19 2007/01/09 00:27:56 imp Exp $
+.\" $FreeBSD$
.\"
.Dd February 13, 1998
.Dt USLEEP 3
.Sh SYNOPSIS
.In unistd.h
.Ft int
-.Fo usleep
-.Fa "useconds_t useconds"
-.Fc
+.Fn usleep "useconds_t microseconds"
.Sh DESCRIPTION
The
.Fn usleep
function suspends execution of the calling thread until either
-.Fa useconds
-microseconds have elapsed
-or a signal is delivered to the thread whose action
-is to invoke a signal-catching function
-or to terminate the thread or process.
-The actual time slept may be longer, due to system latencies
-and possible limitations in the timer resolution of the hardware.
+.Fa microseconds
+microseconds have elapsed or a signal is delivered to the thread and its
+action is to invoke a signal-catching function or to terminate the
+process.
+System activity or limitations may lengthen the sleep by an indeterminate amount.
.Pp
-This function is implemented, using
-.Xr nanosleep 2 ,
+This function is implemented using
+.Xr nanosleep 2
by pausing for
-.Fa useconds
+.Fa microseconds
microseconds or until a signal occurs.
Consequently, in this implementation,
-sleeping has no effect on the state of process timers
+sleeping has no effect on the state of process timers,
and there is no special handling for SIGALRM.
+Also, this implementation does not put a limit on the value of
+.Fa microseconds
+(other than that limited by the size of the
+.Ft useconds_t
+type); some other platforms require it to be less than one million.
+.Sh NOTE
+The
+.Fn usleep
+function is obsolescent.
+Use
+.Xr nanosleep 2
+instead.
.Sh RETURN VALUES
.Rv -std usleep
.Sh ERRORS