Parses a duration string and converts it to milliseconds.
The duration string can contain multiple time units, such as "1h 30m" or "2 days 3 hours". Supported time units are:
The duration string to parse.
The total duration in milliseconds.
Throws a syntax error if an unknown time unit is encountered.
Throws a syntax error if no valid duration is found inside of the duration string.
Parses a duration string and converts it to milliseconds.
The duration string can contain multiple time units, such as "1h 30m" or "2 days 3 hours". Supported time units are: