Causes a thread to wait for a specified period.
Threads Library (libpthreads.a)
#include <pthread.h>
int pthread_delay_np ( interval)
struct timespec *interval;
The pthread_delay_np subroutine causes the calling thread to delay execution for a specified period of elapsed wall clock time. The period of time the thread waits is at least as long as the number of seconds and nanoseconds specified in the interval parameter.
This subroutine is not POSIX compliant and is provided only for compatibility with DCE threads. It should not be used when writing new applications.
Item | Description |
---|---|
interval | Points to the time structure specifying the wait period. |
Upon successful completion, 0 is returned. Otherwise, an error code is returned.
The pthread_delay_np subroutine is unsuccessful if the following is true:
Item | Description |
---|---|
EINVAL | The interval parameter is not valid. |