#include <time.h> useconds_t usleep( useconds_t useconds );
This routine returns the number of unslept seconds.
The sleep()
function delays the calling thread by the specified
number of seconds
.
The usleep()
function suspends the calling thread from execution
until either the number of microseconds specified by the
useconds
argument has elapsed or a signal is delivered to the
calling thread and its action is to invoke a signal-catching function
or to terminate the process.
Because of other activity, or because of the time spent in processing the call, the actual length of time the thread is blocked may be longer than the amount of time specified.
This call is interruptible by a signal.
The Single UNIX Specification allows this service to be implemented using
the same timer as that used by the alarm()
service. This is
NOT the case for RTEMS and this call has no interaction with
the SIGALRM
signal.
Copyright © 1988-2007OAR Corporation