pub fn parse_duration(s: &str) -> Result<Duration, String>
Parse a duration string like “30d”, “1w”, “24h”.
Supported units:
s
m
h
d
w
Returns an error if the format is invalid.