Skip to main content

parse_to_milliseconds

Function parse_to_milliseconds 

Source
pub fn parse_to_milliseconds(time_arg: &str) -> Result<u64, &str>
Expand description

Parse a given time string into milliseconds. This can be used to convert a string such as ‘20ms’, ‘10s’ or ‘1h’ into adequate milliseconds. Without suffix, the default behavior is to parse into milliseconds. Performs the public parse_to_milliseconds operation.