MIST milToGame

From DCS World Wiki - Hoggitworld.com


mist.time.milToGame

Added with: Mist 3.7
Description
Returns a numerical value in seconds of the next occurrence of the passed military time string. If the boolean value timeUntil is present the value returned is the time it will take to reach the specified military time. String military must be exactly 4 characters
Syntax
number mist.time.milToGame(string mil , boolean timeUntil )
Valid Input Values:
'0000' to '2359'
Return value:
number
Return example:
Any numeric value greater than 0.
Usage Examples:
Assuming these scripts are run on day 0 at 1 AM (3600 seconds)
mist.timeMilToGame('0200') returns 7200 
mist.timeMilToGame('0200', true ) returns 3600

If scripts ran at 3AM (10800 seconds) -- Note script returns the NEXT occurance

mist.timeMilToGame('0200') returns 93600 
mist.timeMilToGame('0200', true ) returns 90000
Notes:
Related Functions
getDate, getDHMS, convertToSec, milToGame

Scripting Engine

MIST Root Page