| 47 | |
| 48 | template <typename RepresentationType> |
| 49 | Duration DurationFromNanoseconds(RepresentationType representation) { |
| 50 | return std::chrono::duration_cast<Duration>( |
| 51 | std::chrono::duration<RepresentationType, std::nano>(representation)); |
| 52 | } |
| 53 | |
| 54 | inline float ToFloatSeconds(const Duration& duration) { |
| 55 | return std::chrono::duration_cast<std::chrono::duration<float>>(duration) |