From faf3f12424fa8558e65fa3f1dd3aa1d0eea8604e Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 9 Mar 2023 14:53:36 +0100 Subject: refactor: Replace GetTimeMicros by SystemClock --- src/util/time.cpp | 5 ----- src/util/time.h | 10 +++++----- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/util') diff --git a/src/util/time.cpp b/src/util/time.cpp index 58200c83fc..fb9bc34931 100644 --- a/src/util/time.cpp +++ b/src/util/time.cpp @@ -107,11 +107,6 @@ int64_t GetTimeMillis() return int64_t{GetSystemTime().count()}; } -int64_t GetTimeMicros() -{ - return int64_t{GetSystemTime().count()}; -} - int64_t GetTime() { return GetTime().count(); } std::string FormatISO8601DateTime(int64_t nTime) { diff --git a/src/util/time.h b/src/util/time.h index fcf85c1e03..8c6baeb12a 100644 --- a/src/util/time.h +++ b/src/util/time.h @@ -29,6 +29,8 @@ using SteadySeconds = std::chrono::time_point; using SteadyMicroseconds = std::chrono::time_point; +using SystemClock = std::chrono::system_clock; + void UninterruptibleSleep(const std::chrono::microseconds& n); /** @@ -63,16 +65,14 @@ using MillisecondsDouble = std::chrono::duration() if a cast is needed. * ClockType is - * - std::chrono::steady_clock for steady time - * - std::chrono::system_clock for system time - * - NodeClock for mockable system time + * - SteadyClock/std::chrono::steady_clock for steady time + * - SystemClock/std::chrono::system_clock for system time + * - NodeClock for mockable system time */ int64_t GetTime(); /** Returns the system time (not mockable) */ int64_t GetTimeMillis(); -/** Returns the system time (not mockable) */ -int64_t GetTimeMicros(); /** * DEPRECATED -- cgit v1.2.3