Calling scheduleOnce()
queues the timer to be called back once after the specified delay.
func
func, delay
func
called when the timer fires.delay
is the time until the timer fires, in seconds (different than Javascript's setInterval()
, which uses milliseconds). The timer will be scheduled only if this parameter is provided; if it is omitted, a scheduleOnce()
or scheduleRepeat()
call will be needed.A Timer
object.
> timer = new Timer"Fired!";
undefined
> 2;
undefined
Fired!
XPLMCreateFlightLoop
is used to create a timer.XPLMScheduleFlightLoop
to schedule the timer.run_timer()