pub fn format_duration(d: &Duration) -> StringExpand description
Formats a Duration into a string. The returned string represents the
duration in the form ā72h3m0.5sā. Leading zero units are omitted. As a
special case, durations less than one second format use a smaller unit
(milli-, micro-, or nanoseconds) to ensure that the leading digit is
non-zero. The zero duration formats as 0s.
This is a direct port of the Go version of the time.Duration.String()
function.