Notch Notch Manual 0.9.23
 Light | Dark
CancelTimer()

CancelTimer()

Purpose #

Cancels a timer.

Syntax #

void CancelTimer(string name);

Parameters

nameThe string name identifier that you specified in the Timer() call.

Example #

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.