Module DCS.DCStimer

Global(s)

Global timer

Type(s)

Field(s)

Function(s)

Returns mission time in seconds.

Return value:

#Time:

Returns model time in seconds.

Return value:

#Time:

Returns mission start time in seconds.

Return value:

#Time:

Removes the function from schedule.

Parameter:
functionId

Function identifier to remove from schedule

Schedules function to call at desired model time.

Time function FunctionToCall(any argument, Time time)

...

return ...

end

Must return model time of next call or nil. Note that the DCS scheduler calls the function in protected mode and any Lua errors in the called function will be trapped and not reported. If the function triggers a Lua error then it will be terminated and not scheduled to run again.

Parameters:
#FunctionToCall functionToCall

Lua-function to call. Must have prototype of FunctionToCall.

functionArgument

Function argument of any type to pass to functionToCall.

#Time time

Model time of the function call.

Return value:

functionId

Re-schedules function to call at another model time.

Parameters:
functionId

Lua-function to call. Must have prototype of FunctionToCall.

#Time time

Model time of the function call.