ofiwg / libfabric

Open Fabric Interfaces

Home Page:http://libfabric.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pthread_cond_timedwait does not use CLOCK_MONOTONIC

skypexu opened this issue · comments

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

Fixed.