int sem_timedwait(sem_t *restrict sem, const struct timespec *restrict abs_timeout);
The timeout expires after the amount of time specified by abs_timeout passes or if the specified amount of time has already passed at the time of the call.
The timespec data type is defined as a structure in the <time.h> header.
If the semaphore can be locked immediately, the abs_timeout argument is ignored.
Specifies the semaphore to be locked.
Specifies how long to wait for the semaphore to become unlocked by another thread or process.
When successful, the
A signal interrupted this function.
The sem argument is not a valid semaphore.
The process or thread would have blocked, and the abs_timeout parameter specified a nanoseconds field value less than zero or greater than or equal to 1000 million.
The semaphore could not be locked before the specified timeout expired.
UNIX 03. Derived from IEEE Std 1003.1d-1999.
On the NuTCRACKER Platform, the timeout is handled by Win32 functions and is less precise
than on UNIX platforms.
On UNIX platforms with the Timers option supported,
the timeout is based on the CLOCK_REALTIME clock.
On UNIX platforms without the Timers option, the timeout is based
on the system clock as returned by the
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.