Skip to main content

parse_duration

Function parse_duration 

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

Parses 30s, 5m, 1h, 2d or a bare number of seconds into whole seconds. Zero and negative values are errors.