| 49 | } |
| 50 | |
| 51 | TDuration 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 | |
| 60 | TCpuDuration DurationToCpuDuration(TDuration duration, double microsecondsToTicks) |
| 61 | { |
no test coverage detected