#include <oskit/threads/pthread.h>int oskit_pthread_sleep(oskit_s64_t milliseconds);
The calling thread is put to sleep for the number of milliseconds specified. The thread will be woken up after the elapsed time, and will return ETIMEDOUT. If the timeout is zero, the thread is put to sleep forever. The thread may be woken up early, using the oskit_pthread_wakeup function, in which case the return value is zero.
- milliseconds
- The number of milliseconds the thread should sleep for.
Returns ETIMEDOUT if the timeout expires, or zero if the thread is woken up early.
oskit_pthread_wakeup