You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our implementation is located in pal/sleep.c. On most platforms, _POSIX_MONOTONIC_CLOCK does not appear to be > 0, so just basic gettimeofday() is used. It's not trivial to just enable clock_gettime, as many older platforms also require linking with -lrt library.
The text was updated successfully, but these errors were encountered:
error output:
test_timer.cpp(169):
Assert: timerTestStrand.timeoutTime-startTimeUsec >= FIFTY_MILLISECONDS_AS_USEC
(Timeout took shorter than expected)
[Failed] libtest_base.so:TimerTest_BasicTimeout_Success 0.054719
Investigations show that the actual timeout was sometimes 49.* msecs.
Although various platforms provide high-precision timers, there isn't an easy way to implement this on all platforms. See http://stackoverflow.com/questions/361363/how-to-measure-time-in-milliseconds-using-ansi-c.
Our implementation is located in pal/sleep.c. On most platforms, _POSIX_MONOTONIC_CLOCK does not appear to be > 0, so just basic gettimeofday() is used. It's not trivial to just enable clock_gettime, as many older platforms also require linking with -lrt library.
The text was updated successfully, but these errors were encountered: