Name
ResetTimer -- reset a timer (V4.5)
Synopsis
ResetTimer(id[, time])
Function
You can use this function to reset an existing timer to zero or to a specified time. If you want to reset the timer to zero, simply leave out the second argument. Otherwise use the second argument to specify a time in milliseconds for the timer.

Using ResetTimer() to clear a timer is generally faster than starting a new using StartTimer(), so you should use ResetTimer() if you can.

Inputs
id
identifier of the timer that shall be reset
time
optional: desired time value for the timer in milliseconds (defaults to 0 which means no time)
Example
StartTimer(1)
Wait(1000, #MILLISECONDS)
Print(GetTimer(1))
ResetTimer(1, 2000)
Print(GetTimer(1))
The code above will start a new timer 1, wait a second and then print the state of the timer which should be 1000 or a few milliseconds more. Then the timer state is set to 2000 milliseconds and printed again. This time it should be 2000 or a few milliseconds more.

Show TOC