Update test_stopwatch.cpp

This commit is contained in:
Gabi Melman 2023-05-27 22:46:27 +03:00 committed by GitHub
parent 62a4b8ce4e
commit 8222ca4837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,6 @@ TEST_CASE("stopwatch2", "[stopwatch]")
auto val = std::stod(test_sink->lines()[0]);
auto diff_duration = duration_cast<std::chrono::duration<double>>(stop - start);
REQUIRE(val >= diff_duration.count());
REQUIRE(val >= (diff_duration - milliseconds(3)).count());
REQUIRE(val <= (diff_duration + tolerance_duration).count());
}