[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    usleep(3C) manual page Table of Contents

Name

usleep - suspend execution for interval in microseconds

Synopsis

#include <unistd.h>

int usleep(unsigned int useconds);

Description

Suspend the caller 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.

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

See Also

alarm(2) , getitimer(2) , poll(2) , sigprocmask(2) , select(3C) , sleep(3C) , ualarm(3C)

Notes

A microsecond is .000001 seconds.


Table of Contents