mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 00:05:13 +02:00
refactor: Replace GetTimeMicros by SystemClock
This commit is contained in:
@@ -29,6 +29,8 @@ using SteadySeconds = std::chrono::time_point<std::chrono::steady_clock, std::ch
|
||||
using SteadyMilliseconds = std::chrono::time_point<std::chrono::steady_clock, std::chrono::milliseconds>;
|
||||
using SteadyMicroseconds = std::chrono::time_point<std::chrono::steady_clock, std::chrono::microseconds>;
|
||||
|
||||
using SystemClock = std::chrono::system_clock;
|
||||
|
||||
void UninterruptibleSleep(const std::chrono::microseconds& n);
|
||||
|
||||
/**
|
||||
@@ -63,16 +65,14 @@ using MillisecondsDouble = std::chrono::duration<double, std::chrono::millisecon
|
||||
* DEPRECATED
|
||||
* Use either ClockType::now() or Now<TimePointType>() 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
|
||||
|
||||
Reference in New Issue
Block a user