mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Wrap hiResCounterHandler in a function to prevent an order of initialization problems
This commit is contained in:
@@ -267,11 +267,15 @@ private:
|
|||||||
double highResTimerToMillisecRatio;
|
double highResTimerToMillisecRatio;
|
||||||
};
|
};
|
||||||
|
|
||||||
static HiResCounterHandler hiResCounterHandler;
|
static HiResCounterHandler& hiResCounterHandler()
|
||||||
|
{
|
||||||
|
static HiResCounterHandler hiResCounterHandler;
|
||||||
|
return hiResCounterHandler;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 beast_millisecondsSinceStartup() noexcept { return hiResCounterHandler.millisecondsSinceStartup(); }
|
uint32 beast_millisecondsSinceStartup() noexcept { return hiResCounterHandler().millisecondsSinceStartup(); }
|
||||||
double Time::getMillisecondCounterHiRes() noexcept { return hiResCounterHandler.getMillisecondCounterHiRes(); }
|
double Time::getMillisecondCounterHiRes() noexcept { return hiResCounterHandler().getMillisecondCounterHiRes(); }
|
||||||
int64 Time::getHighResolutionTicksPerSecond() noexcept { return hiResCounterHandler.highResTimerFrequency; }
|
int64 Time::getHighResolutionTicksPerSecond() noexcept { return hiResCounterHandler().highResTimerFrequency; }
|
||||||
int64 Time::getHighResolutionTicks() noexcept { return (int64) mach_absolute_time(); }
|
int64 Time::getHighResolutionTicks() noexcept { return (int64) mach_absolute_time(); }
|
||||||
|
|
||||||
bool Time::setSystemTimeToThisTime() const
|
bool Time::setSystemTimeToThisTime() const
|
||||||
|
|||||||
Reference in New Issue
Block a user