CancelTimer()
Updated: 4 Dec 2023
Updated: 4 Dec 2023
Cancels a timer.
void CancelTimer(string name);
name | The string name identifier that you specified in the Timer() call. |
function Init()
{
Timer(1.0, myTimerFunction, name='secondTimer', true);
CancelTimer("secondTimer");
}
function myTimerFunction()
{
Log("Never gets called");
}
Use View->Log Window to see the log file.
You cannot call CancelTimer in the global scope. Easiest to initiate from code initiated by either Init or Update.