| 81 | } |
| 82 | |
| 83 | TInstant CpuInstantToInstant(TCpuInstant cpuInstant) |
| 84 | { |
| 85 | // TDuration is unsigned and does not support negative values, |
| 86 | // thus we consider two cases separately. |
| 87 | auto state = GetCalibrationState(); |
| 88 | return cpuInstant >= state.CpuInstant |
| 89 | ? state.Instant + CpuDurationToDuration(cpuInstant - state.CpuInstant, GetTicksToMicroseconds()) |
| 90 | : state.Instant - CpuDurationToDuration(state.CpuInstant - cpuInstant, GetTicksToMicroseconds()); |
| 91 | } |
| 92 | |
| 93 | TCpuInstant InstantToCpuInstant(TInstant instant) |
| 94 | { |
nothing calls this directly
no test coverage detected