rate
Convert rate string ("100/m", "2/h" or "0.5/s") to seconds.
def rate(
r: string
) - > float
Convert rate string ("100/m", "2/h" or "0.5/s") to seconds.
Parameters
| Name | Type | Description |
|---|---|---|
| r | string | The rate string containing a numeric value and an optional time unit modifier (e.g., 'm' for minutes, 'h' for hours) separated by a forward slash. |
Returns
| Type | Description |
|---|---|
float | The equivalent duration in seconds calculated from the rate and its time modifier. |