From 7a89b7573749846654575fec0580e105a27c54cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 13 Sep 2024 11:15:54 +0200 Subject: [PATCH] Use steady_clock in the timer --- src/catch2/catch_timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catch2/catch_timer.cpp b/src/catch2/catch_timer.cpp index d75ea70c..51396654 100644 --- a/src/catch2/catch_timer.cpp +++ b/src/catch2/catch_timer.cpp @@ -13,7 +13,7 @@ namespace Catch { namespace { static auto getCurrentNanosecondsSinceEpoch() -> uint64_t { - return std::chrono::duration_cast(std::chrono::high_resolution_clock::now().time_since_epoch()).count(); + return std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); } } // end unnamed namespace