float_as_duration
No overview available.
def float_as_duration(
seconds: float
) - > string
Converts a floating-point number representing seconds into a human-readable duration string in 'HH:MM:SS' format. This is useful for displaying elapsed time or media playback lengths where sub-second precision is not required.
Parameters
| Name | Type | Description |
|---|---|---|
| seconds | float | The total number of seconds to be converted into a formatted duration string. |
Returns
| Type | Description |
|---|---|
string | A formatted string representing the duration in hours, minutes, and seconds (e.g., '01:05:20'). |