Skip to main content

format_duration

Function format_duration 

Source
pub fn format_duration(d: &Duration) -> String
Expand description

Canonical display for a duration: largest exact unit (500ms, 10s, 2m, 1h), falling back to milliseconds. Round-trips through parse_duration.