pub fn parse_duration(input: &str) -> Result<Duration, RuntimeError>Expand description
Parse a duration string with one of the supported suffixes:
| suffix | unit |
|---|---|
ms | milliseconds |
s | seconds |
m | minutes |
h | hours |
d | days |
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.