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

Function CpuDurationToDuration

library/cpp/yt/cpu_clock/clock.cpp:51–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51TDuration CpuDurationToDuration(TCpuDuration cpuDuration, double ticksToMicroseconds)
52{
53 // TDuration is unsigned and thus does not support negative values.
54 if (cpuDuration < 0) {
55 return TDuration::Zero();
56 }
57 return TDuration::MicroSeconds(static_cast<ui64>(cpuDuration * ticksToMicroseconds));
58}
59
60TCpuDuration DurationToCpuDuration(TDuration duration, double microsecondsToTicks)
61{

Callers 2

GetInstantFunction · 0.85
CpuInstantToInstantFunction · 0.85

Calls 3

ZeroFunction · 0.85
MicroSecondsFunction · 0.85
GetTicksToMicrosecondsFunction · 0.85

Tested by

no test coverage detected