Parses a string representation of a duration and returns a corresponding Timeout object.
Parses a string representation of a duration and returns a corresponding Timeout object.
Value parameters
t
a string representing the duration in the format "number unit" (e.g., "10 seconds"). If the format is invalid, a default timeout of 10 seconds is returned.
Attributes
Returns
a Timeout object representing the parsed duration or a default of 10 seconds if parsing fails.