Skip to main content

parse_duration

Function parse_duration 

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

Parse a duration string with one of the supported suffixes:

suffixunit
msmilliseconds
sseconds
mminutes
hhours
ddays

Whitespace between the number and the suffix is allowed. Earlier revisions only supported ms and s, which forced 5m to be written as 300s and made script-level timeouts awkward.