Skip to main content

parse_duration_secs

Function parse_duration_secs 

Source
pub fn parse_duration_secs(s: &str) -> Option<u64>
Expand description

Parse a duration like 5s, 200ms, 1m, 1h into seconds (rounded down).

This is a best-effort parser used when the engine needs an integer seconds value (e.g. Docker API start_period).