Skip to content

Commit cec4695

Browse files
Fix cmake Windows / build (windows-latest, Release)
1 parent 78be587 commit cec4695

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/gtest_wakeup.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ TEST(WakeUp, BasicTest)
4141

4242
using namespace std::chrono;
4343

44-
auto t1 = system_clock::now();
44+
auto t1 = steady_clock::now();
4545
tree.tickOnce();
4646
tree.sleep(milliseconds(200));
47-
auto t2 = system_clock::now();
47+
auto t2 = steady_clock::now();
4848

4949
auto dT = duration_cast<milliseconds>(t2 - t1).count();
5050
std::cout << "Woke up after msec: " << dT << std::endl;
5151

52-
ASSERT_LT(dT, 25);
52+
// 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);
5355
}

0 commit comments

Comments
 (0)