Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ usleep(3) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

alarm(2)

sigaction(2)

sigpause(3)

ualarm(3)

getitimer(3C)

sleep(3C-ucb)

usleep(3)               (BSD Compatibility Package)               usleep(3)

NAME
     usleep - suspend execution for interval in microseconds

SYNOPSIS
     /usr/ucb/cc [flag ...] file ... -lucb

     #include <unistd.h>

     int usleep(usecondst useconds);

DESCRIPTION
     The usleep() function suspends the current process from execution for
     the number of microseconds specified by the useconds argument. Because
     of other activity, or because of the time spent in processing the
     call, the actual suspension time may be longer than the amount of time
     specified.

     The useconds argument must be less than 1,000,000. If the value of
     useconds is 0, then the call has no effect.

     The usleep() function uses the process' real-time interval timer to
     indicate to the system when the process should be woken up.

     There is one real-time interval timer for each process. The usleep()
     function will not interfere with a previous setting of this timer. If
     the process has set this timer prior to calling usleep(), and if the
     time specified by useconds equals or exceeds the interval timer's
     prior setting, the process will be woken up shortly before the timer
     was set to expire.

     Implementations may place limitations on the granularity of timer
     values. For each interval timer, if the requested timer value requires
     a finer granularity than the implementation supports, the actual timer
     value will be rounded up to the next supported value.

     Interactions between usleep() and either alarm() or sleep() are
     unspecified.

RETURN VALUE
     On successful completion, usleep() returns 0. Otherwise, it returns -1
     and sets errno to indicate the error.

ERRORS
     The usleep() function may fail if:

     EINVAL    The time interval specified 1,000,000 or more microseconds.

NOTES
     The usleep() function is included for its historical usage. The seti-
     timer() function is preferred over this function.





Page 1                       Reliant UNIX 5.44                Printed 11/98

usleep(3)               (BSD Compatibility Package)               usleep(3)

SEE ALSO
     alarm(2), sigaction(2), sigpause(3), ualarm(3), getitimer(3C),
     sleep(3C-ucb).



















































Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026