RTEMS Logo

RTEMS 4.7.2 On-Line Library


Clock Manager usleep - Delay Process Execution in Microseconds

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

14.4.5: usleep - Delay Process Execution in Microseconds

CALLING SEQUENCE:

#include <time.h>

useconds_t usleep(
  useconds_t useconds
);

STATUS CODES:

This routine returns the number of unslept seconds.

DESCRIPTION:

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.

NOTES:

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.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation