pub fn ParseDurationToMillis(DurationStr: &str) -> Result<u64>Expand description
Parse duration string to milliseconds
Parses duration strings like “100ms”, “1s”, “1m”, “1h” to milliseconds.
§Arguments
DurationStr- Duration string (e.g., “1s”, “500ms”, “1m30s”)
§Errors
Returns an error if the duration string is invalid.
§Support
Supports:
- ms, s, m, h suffixes
- Combined durations like “1h30m” or “1m30s”
- Decimal values like “1.5s”