Skip to main content

parse_duration

Function parse_duration 

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

Parse a TIMEOUT duration token (500ms, 10s, 2m, 1h; a bare number means seconds). One optional space may separate the number from its unit (30 s), like byte counts: bare DSL tokens still split upstream, so this covers quoted strings and variables.