Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt

Allows you to cancel all timers associated with a specific function.

If there are multiple timers associated with a specific function, it's not possible to cancel one specific timer.

Syntax

Code Block
themeEclipse
languagejavascript
linenumberstrue
removeTimer(functionName);

Parameters

ParameterMandatoryTypeDescription
functionName(tick)String

All timers (including queued function calls) associated with the named function (referenced by it's name in quotes) will be cancelled.

Return value

It's not clear what the value will be, so don't do anything with it.

Example

Code Block
themeEclipse
languagejavascript
titleSetting / removing a timer
linenumberstrue
function foo() {
  // do stuff
}

setTimer("foo",1000);
 
removeTimer("foo"); // cancel all timers that relate to function "foo"

See also