Skip to main content

parse_duration

Function parse_duration 

Source
pub fn parse_duration(text: &str) -> Result<Duration, DurationError>
Expand description

Parse <integer><unit> where unit is ms, s, or m.

Zero parses (0s): this owns the syntax, and whether a command accepts a zero timeout or interval is that command’s rule to state.