pthread_cond_timedwait does not use CLOCK_MONOTONIC
skypexu opened this issue · comments
Xu Yifeng commented
Describe the bug
function ofi_wait_cond uses ofi_gettime_ms() to get current time, and ofi_gettime_ms uses CLOCK_MONOTONIC,
but pthread_cond_timedwait default uses CLOCK_REALTIME, the two clocks are different.
To Reproduce
Expected behavior
ofi_gettime_ms should use CLOCK_REALTIME or make another API to return time with CLOCK_REALTIME
Output
Environment:
Linux
Additional context
Jianxin Xiong commented
Fixed.