Name
StartTimer -- start a new timer
Synopsis
[id] = StartTimer(id[, elapse])
Function
This function creates a new timer and assigns the identifier id to it. If you pass Nil in id, StartTimer() will automatically choose an 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().

Starting with Hollywood 9.0, there is a new optional elapse argument. If you set this to a time in milliseconds, TimerElapsed() will return True as soon as the timer has been running for the specified amount of time. Alternatively, you can also use WaitTimer() to wait for a timer to elapse. Finally, the timer's elapse value can also be set or modified using SetTimerElapse(). See SetTimerElapse for details.

Inputs
id
id for your timer or Nil for auto id selection
elapse
optional: number of milliseconds until the timer should elapse (defaults to 0 which means that it will never elapse) (V9.0)
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 about 4000 milliseconds.

Show TOC