mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
Fixed stopwatch test
This commit is contained in:
@@ -12,7 +12,7 @@ TEST_CASE("stopwatch1", "[stopwatch]") {
|
||||
std::this_thread::sleep_for(wait_ms);
|
||||
auto stop = clock::now();
|
||||
auto diff_ms = std::chrono::duration_cast<milliseconds>(stop - start);
|
||||
REQUIRE(sw.elapsed() >= diff_ms);
|
||||
REQUIRE(sw.elapsed() >= diff_ms - milliseconds(1));
|
||||
REQUIRE(sw.elapsed() <= diff_ms + tolerance_ms);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user