Skip to content

Commit 7a89b75

Browse files
committed
Use steady_clock in the timer
1 parent 02d3304 commit 7a89b75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/catch2/catch_timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Catch {
1313

1414
namespace {
1515
static auto getCurrentNanosecondsSinceEpoch() -> uint64_t {
16-
return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
16+
return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
1717
}
1818
} // end unnamed namespace
1919

0 commit comments

Comments
 (0)