Mix usage of different clock source
Describe the bug (描述bug)
All APIs that accept timeout say the timeout should be measured in clock_realtime. However, under the hook, brpc uses futex syscall to wait for a specific time.
https://github.com/apache/brpc/blob/4c33f886756689d6ae90905c5f0cc6fef97e90cf/src/bthread/sys_futex.h#L38-L42
And according to https://www.man7.org/linux/man-pages/man2/futex.2.html, futex uses clock_monotonic clock by default.
To Reproduce (复现方法)
Expected behavior (期望行为)
Use the same clock source for all timeouts. Better use clock_monotonic as it's efficient and has some degree of defense against system time jump.
Versions (各种版本) OS: Compiler: brpc: protobuf:
Additional context/screenshots (更多上下文/截图)
Related issue: #2763