GetTimeOfDaySeconds
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | GetTimeOfDaySeconds | |
| Function Description: | Returns the number of seconds since midnight of the current day in the mission, calculated from absolute time using modulo arithmetic to ensure it falls within a 24-hour cycle. | |
| File Location: | cmm.timeFunctions.lua | |
| Syntax: | CMM.GetTimeOfDaySeconds( number or nil TimeNum ) | |
| Return Value: | number | |
| Parameters: | Name | Description |
| TimeNum | The number of seconds to convert into seconds since midnight; if nil or not a number, uses current absolute game time. | |
| Example: | GetTimeOfDaySeconds(90061) | |
| Example Description: | Returns "1:01:01" as 90061 seconds equals 1 hour, 1 minute, and 1 second since midnight, with the function returning the underlying seconds value. | |
| Related Functions: | ||
| Notes: | ||