Skip to content

Latest commit

 

History

History

timer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
nav-title title description
Module timer
Module timer
Module timer

Module: "timer"

// To import the "timer" module:
var timer = require("timer");
Functions
  • setTimeout( callback Function, milliseconds? Number ) Number
    Calls a function after a specified delay.
    • callback - Function
      The function to be called.
    • milliseconds - (optional) - Number
      The time to wait before the function is called. Defaults to 0.
    • return - Number
  • clearTimeout( id Number )
    Clears the delay set by a call to the setTimeout function.
    • id - Number
      The identifier returned by the previously called setTimeout() method.
  • setInterval( callback Function, milliseconds? Number ) Number
    Calls a function repeatedly with a delay between each call.
    • callback - Function
      The function to be called.
    • milliseconds - (optional) - Number
      The delay between each function call.
    • return - Number
  • clearInterval( id Number )
    Clears repeated function which was set up by calling setInterval().
    • id - Number
      The identifier returned by the setInterval() method.