Skip to content

Commit

Permalink
Revert behavior change on current_time_since_unix_epoch (#5213)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany authored Sep 9, 2024
1 parent 70314ce commit 0a2e9ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/cpp/utils/time_t_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<seconds>(t_since_epoch);
// Remove seconds from time
Expand Down

0 comments on commit 0a2e9ff

Please sign in to comment.