From 8b67465c9be25de5d501876b366959f0f4968fcf Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 9 Sep 2024 19:48:13 +0200 Subject: [PATCH] Revert behavior change on `current_time_since_unix_epoch` (#5213) Signed-off-by: Miguel Company --- src/cpp/utils/time_t_helpers.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cpp/utils/time_t_helpers.hpp b/src/cpp/utils/time_t_helpers.hpp index 7ee8a023eb7..2cebe2a128d 100644 --- a/src/cpp/utils/time_t_helpers.hpp +++ b/src/cpp/utils/time_t_helpers.hpp @@ -40,12 +40,8 @@ static void current_time_since_unix_epoch( { using namespace std::chrono; - static const auto init_time_since_epoch = system_clock::now().time_since_epoch(); - static const auto init_steady_time = steady_clock::now(); - // Get time since epoch - auto t_elapsed = steady_clock::now() - init_steady_time; - auto t_since_epoch = init_time_since_epoch + t_elapsed; + auto t_since_epoch = system_clock::now().time_since_epoch(); // Get seconds auto secs_t = duration_cast(t_since_epoch); // Remove seconds from time