FormatSeconds
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | FormatSeconds | |
| Function Description: | Converts a number of seconds into a formatted HH:MM:SS string representation by calculating hours, minutes, and seconds and padding each component to two digits. | |
| File Location: | cmm.timeFunctions.lua | |
| Syntax: | CMM.FormatSeconds( number TimeInSeconds ) | |
| Return Value: | string | |
| Parameters: | Name | Description |
| TimeInSeconds | Total time in seconds to convert into HH:MM:SS format, including fractional seconds which are rounded to the nearest whole second. | |
| Example: | CMM.FormatSeconds(3661) | |
| Example Description: | Returns "1:01:01" as 3661 seconds equals 1 hour, 1 minute, and 1 second, with each component properly padded. | |
| Related Functions: | ||
| Notes: | ||