The Semaphore supports only CLOCK_REALTIME, which has issues when the system time is changed. The POSIX ConditionVariable has an attribute to specify the clock and also accepts CLOCK_MONOTONIC.
On Systems that support POSIX condition variables, those should be used with the CLOCK_MONOTONIC instead of the Semaphore in combination with the AdaptiveWait.
Brief feature description
The
Semaphore
supports onlyCLOCK_REALTIME
, which has issues when the system time is changed. The POSIXConditionVariable
has an attribute to specify the clock and also acceptsCLOCK_MONOTONIC
.On Systems that support POSIX condition variables, those should be used with the
CLOCK_MONOTONIC
instead of theSemaphore
in combination with theAdaptiveWait
.