MCPcopy Create free account
hub / github.com/catboost/catboost / InstantToCpuInstant

Function InstantToCpuInstant

library/cpp/yt/cpu_clock/clock.cpp:93–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93TCpuInstant InstantToCpuInstant(TInstant instant)
94{
95 // See above.
96 auto state = GetCalibrationState();
97 return instant >= state.Instant
98 ? state.CpuInstant + DurationToCpuDuration(instant - state.Instant, GetMicrosecondsToTicks())
99 : state.CpuInstant - DurationToCpuDuration(state.Instant - instant, GetMicrosecondsToTicks());
100}
101
102////////////////////////////////////////////////////////////////////////////////
103

Callers

nothing calls this directly

Calls 3

GetCalibrationStateFunction · 0.85
DurationToCpuDurationFunction · 0.85
GetMicrosecondsToTicksFunction · 0.85

Tested by

no test coverage detected