usleep(3BSD) (BSD System Compatibility) usleep(3BSD)
NAME
usleep - (BSD) suspend execution for interval in microseconds
SYNOPSIS
/usr/ucb/cc [flag . . . ] file . . .
usleep(unsigned useconds);
DESCRIPTION
Suspend the current process for the number of microseconds
specified by the argument. The actual suspension time may be
an arbitrary amount longer because of other activity in the
system, or because of the time spent in processing the call.
The routine is implemented by setting an interval timer and
pausing until it occurs. The previous state of this timer is
saved and restored. If the sleep time exceeds the time to the
expiration of the previous timer, the process sleeps only
until the signal would have occurred, and the signal is sent a
short time later.
This routine is implemented using setitimer [see
getitimer(3C)]; it requires eight system calls each time it is
invoked.
REFERENCES
alarm(2), getitimer(3C), sigpause(3BSD), sleep(3BSD),
ualarm(3BSD)
Copyright 1994 Novell, Inc. Page 1