Searched refs:nano_duration (Results 1 – 2 of 2) sorted by relevance
32 std::string PrettyDuration(uint64_t nano_duration, size_t max_fraction_digits) { in PrettyDuration() argument33 if (nano_duration == 0) { in PrettyDuration()36 return FormatDuration(nano_duration, GetAppropriateTimeUnit(nano_duration), in PrettyDuration()41 TimeUnit GetAppropriateTimeUnit(uint64_t nano_duration) { in GetAppropriateTimeUnit() argument45 if (nano_duration >= one_sec) { in GetAppropriateTimeUnit()47 } else if (nano_duration >= one_ms) { in GetAppropriateTimeUnit()49 } else if (nano_duration >= one_us) { in GetAppropriateTimeUnit()74 std::string FormatDuration(uint64_t nano_duration, TimeUnit time_unit, in FormatDuration() argument92 const uint64_t whole_part = nano_duration / divisor; in FormatDuration()93 uint64_t fractional_part = nano_duration % divisor; in FormatDuration()
38 std::string PrettyDuration(uint64_t nano_duration, size_t max_fraction_digits = 3);41 std::string FormatDuration(uint64_t nano_duration, TimeUnit time_unit,45 TimeUnit GetAppropriateTimeUnit(uint64_t nano_duration);