4.3BSD-UWisc/man/cat3/usleep.3

Compare this file to the similar file:
Show the results in this format:




USLEEP(3)           UNIX Programmer's Manual            USLEEP(3)



NAME
     usleep - suspend execution for interval

SYNOPSIS
     usleep(useconds)
     unsigned useconds;

DESCRIPTION
     The current process is suspended from execution 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 _s_e_t_i_t_i_m_e_r(2); it requires
     eight system calls each time it is invoked.  A similar but
     less compatible function can be obtained with a single
     _s_e_l_e_c_t(2); it would not restart after signals, but would not
     interfere with other uses of _s_e_t_i_t_i_m_e_r.

SEE ALSO
     setitimer(2), getitimer(2), sigpause(2), ualarm(3),
     sleep(3), alarm(3)

























Printed 12/27/86          May 15, 1986                          1