[id] = StartTimer(id[, elapse])
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.
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.