Skip to main content

parse_millis_nonzero

Function parse_millis_nonzero 

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

Parses a number of milliseconds into a Duration, rejecting zero.

For a delay, zero usually means “no throttle”. For anything a timer sleeps on it means “spin as fast as the CPU allows”, so the flags that feed one are parsed through here.