Skip to main content

parse_duration

Function parse_duration 

Source
pub fn parse_duration(s: &str) -> Option<u64>
Expand description

Parses a human-readable duration string back to nanoseconds. Inverse of format_duration; also reads the lossless form cloud reports carry (1.004999 ms) and the ASCII us spelling of µs. Negative, non-finite and out-of-range values are None.