clock_nanosleep

Name

clock_nanosleep -- high resultion sleep with specifiable clock

Synopsis

       #include <time.h>

       int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp);

DESCRIPTION

This function suspends execution of the currently running realtime thread until the time interval specified by rqtp is elapsed, or until the function is woken up by a signal. If the TIMER_ABSTIME flag is set in flags, the time interval specified by rqtp is absolute; otherwise, it is relative to the current time. The timeout is experessed with respect to the clock specified by the parameter clock_id.

RETURN VALUE

If the clock_nanosleep function returns because the specified time interval has elapsed, it returns zero. Otherwise, it returns an error value.

ERRORS

EINTR

The function has been interrupted by a signal.

AUTHOR

Michael Barabanov (baraban@fsmlabs.com)

SEE ALSO

clock_gettime(3), nanosleep(3)

2001 FSMLabs Inc.

All rights reserved.