pub fn parse_duration(d: &str) -> Result<Duration, String>Expand description
Parses the &str argument as a Duration Returns Ok(Duration) if successful, or Err(String).
Format is defined as follows: <integer> <unit>
- whitespace between the integer and unit is optional
- integer must be positive (>= 0)
- unit can be one of:
ms/millis/millisecond/millisecondss/sec/secs/second/secondsm/min/mins/minute/minutesh/hour/hoursd/day/days