We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b482851 commit 69f9d8cCopy full SHA for 69f9d8c
test/old_tests/UnitTests/clock.cpp
@@ -76,8 +76,8 @@ TEST_CASE("clock, time_t")
76
REQUIRE(clock::to_time_t(clock::from_time_t(now_tt)) == now_tt);
77
78
// Conversions are verified to be consistent. Now, verify that we're correctly converting epochs
79
- const auto diff = abs(clock::now() - clock::from_time_t(time(nullptr)));
80
- REQUIRE(diff < seconds{ 1 });
+ const auto diff = duration_cast<milliseconds>(abs(clock::now() - clock::from_time_t(time(nullptr)))).count();
+ REQUIRE(diff < 1000);
81
}
82
83
TEST_CASE("clock, FILETIME")
0 commit comments