Name
StartTimer -- start a new timer
Synopsis
[id] = StartTimer(id)
Function
This function creates a new timer and assigns the identifier id to it. If you pass Nil in id, StartTimer() will automatically choose a vacant identifier and return it. This timer will run until you call PauseTimer() or StopTimer(). You can retrieve the current state of the timer by calling GetTimer().

Inputs
id
id for your timer or Nil for auto id selection
Results
id
optional: identifier of the timer; will only be returned when you pass Nil as argument 1 (see above)
Example
StartTimer(1)
Wait(200)
t=GetTimer(1)
Print(t)
The above code starts a new timer, waits 4 seconds and retrieves the timer state. The timer state is copied to the variable t and should have the value of 4000 milliseconds.

Show TOC