We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78be587 commit cec4695Copy full SHA for cec4695
tests/gtest_wakeup.cpp
@@ -41,13 +41,15 @@ TEST(WakeUp, BasicTest)
41
42
using namespace std::chrono;
43
44
- auto t1 = system_clock::now();
+ auto t1 = steady_clock::now();
45
tree.tickOnce();
46
tree.sleep(milliseconds(200));
47
- auto t2 = system_clock::now();
+ auto t2 = steady_clock::now();
48
49
auto dT = duration_cast<milliseconds>(t2 - t1).count();
50
std::cout << "Woke up after msec: " << dT << std::endl;
51
52
- ASSERT_LT(dT, 25);
+ // The wake-up should interrupt the 200 ms sleep well before the timeout,
53
+ // but leave enough headroom for scheduler jitter on loaded CI runners.
54
+ ASSERT_LT(dT, 100);
55
}
0 commit comments