1 parent 32702e4 commit 6e0efc3Copy full SHA for 6e0efc3
1 file changed
src/test/timer/timer_test.hpp
@@ -57,10 +57,11 @@ TEST(Timer, CreateTimer) {
57
// 1e7 = 10ms, 100ms = 1e8
58
// 1s = 1e9
59
DEBUG("timer event count: " << count);
60
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
61
// tight 100us / 10ms window is sensitive to host load; under CI's
62
- // valgrind run it can drop to ~70. Use a loose envelope that still
63
- // catches gross regressions (timer not firing, or firing wildly).
+ // valgrind run it can drop to ~70, and macOS GCD has its own jitter.
+ // Use a loose envelope that still catches gross regressions (timer not
64
+ // firing, or firing wildly).
65
MUST_TRUE(count >= 20 && count <= 200,
66
"timer event count wrong " + to_string(count));
67
#endif
0 commit comments