| 63 | } |
| 64 | |
| 65 | ui64 DurationToCyclesSafe(TDuration duration) |
| 66 | { |
| 67 | if (duration.MicroSeconds() <= std::numeric_limits<ui64>::max() / GetCyclesPerSecond()) { |
| 68 | return DurationToCycles(duration); |
| 69 | } |
| 70 | return duration.MicroSeconds() / 1000000 * GetCyclesPerSecond(); |
| 71 | } |
| 72 | |
| 73 | TPrecisionTimer::TPrecisionTimer() |
| 74 | : Start(::GetCycleCount()) |
no test coverage detected