DCS func setFunctionTime

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: setFunctionTime Added with: 1.2.0
Member Of: timer
Syntax: function timer.setFunctionTime(number functionId , time modelTime )
Description: Re-Schedules an already scheduled function to run at a different time in the future.

Return Value: function
Return Example: none
Examples: The following will run a function named "main" 120 seconds from one the code would run.
 local id = timer.scheduleFunction(main, {}, timer.getTime() + 120)

If further down in the code it was decided to run the main() function sooner it could look like this

 if mustGoFaster == true then  
   timer.setFunctionTime(id, timer.getTime() + 1)
Related Functions: timer Functions: getTime, getAbsTime,getTime0, scheduleFunction, removeFunction, setFunctionTime