Приостановить поток до истечения времени или прихода сигнала
#include <time.h>int nanosleep( const struct timespec *rqtp,struct timespec *rmtp );
NULL
, or a pointer to a struct timespec where the function can store the amount of time remaining in the interval (the requested time minus the time actually slept).libc
The nanosleep() function causes the calling thread to be suspended from execution until either:
![]() | The suspension time may be longer than requested because the argument value is rounded up to be a multiple of the system timer resolution or because of scheduling and other system activity. |
1000
million. POSIX 1003.1 TMR
delay(), errno, clock_getres(), clock_gettime(), clock_settime(), sleep(), timer_create(), timer_delete(), timer_gettime(), timer_settime(), struct timespec, usleep()
Предыдущий раздел: Описание API системной библиотеки