{
  "source": "doc/api/timers.md",
  "modules": [
    {
      "textRaw": "Timers",
      "name": "timers",
      "stability": 3,
      "stabilityText": "Locked",
      "desc": "<p>All of the timer functions are globals.  You do not need to <code>require()</code>\nthis module in order to use them.</p>\n",
      "methods": [
        {
          "textRaw": "clearImmediate(immediateObject)",
          "type": "method",
          "name": "clearImmediate",
          "meta": {
            "added": [
              "v0.9.1"
            ]
          },
          "desc": "<p>Stops an <code>immediateObject</code>, as created by [<code>setImmediate</code>][], from triggering.</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "immediateObject"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "clearInterval(intervalObject)",
          "type": "method",
          "name": "clearInterval",
          "meta": {
            "added": [
              "v0.0.1"
            ]
          },
          "desc": "<p>Stops an <code>intervalObject</code>, as created by [<code>setInterval</code>][], from triggering.</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "intervalObject"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "clearTimeout(timeoutObject)",
          "type": "method",
          "name": "clearTimeout",
          "meta": {
            "added": [
              "v0.0.1"
            ]
          },
          "desc": "<p>Prevents a <code>timeoutObject</code>, as created by [<code>setTimeout</code>][], from triggering.</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "timeoutObject"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "ref()",
          "type": "method",
          "name": "ref",
          "meta": {
            "added": [
              "v0.9.1"
            ]
          },
          "desc": "<p>If a timer was previously <code>unref()</code>d, then <code>ref()</code> can be called to explicitly\nrequest the timer hold the program open. If the timer is already <code>ref</code>d calling\n<code>ref</code> again will have no effect.</p>\n<p>Returns the timer.</p>\n",
          "signatures": [
            {
              "params": []
            }
          ]
        },
        {
          "textRaw": "setImmediate(callback[, arg][, ...])",
          "type": "method",
          "name": "setImmediate",
          "meta": {
            "added": [
              "v0.9.1"
            ]
          },
          "desc": "<p>Schedules &quot;immediate&quot; execution of <code>callback</code> after I/O events&#39;\ncallbacks and before timers set by [<code>setTimeout</code>][] and [<code>setInterval</code>][] are\ntriggered. Returns an <code>immediateObject</code> for possible use with\n[<code>clearImmediate</code>][]. Additional optional arguments may be passed to the\ncallback.</p>\n<p>Callbacks for immediates are queued in the order in which they were created.\nThe entire callback queue is processed every event loop iteration. If an\nimmediate is queued from inside an executing callback, that immediate won&#39;t fire\nuntil the next event loop iteration.</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "callback"
                },
                {
                  "name": "arg",
                  "optional": true
                },
                {
                  "name": "...",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "setInterval(callback, delay[, arg][, ...])",
          "type": "method",
          "name": "setInterval",
          "meta": {
            "added": [
              "v0.0.1"
            ]
          },
          "desc": "<p>Schedules repeated execution of <code>callback</code> every <code>delay</code> milliseconds.\nReturns a <code>intervalObject</code> for possible use with [<code>clearInterval</code>][]. Additional\noptional arguments may be passed to the callback.</p>\n<p>To follow browser behavior, when using delays larger than 2147483647\nmilliseconds (approximately 25 days) or less than 1, Node.js will use 1 as the\n<code>delay</code>.</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "callback"
                },
                {
                  "name": "delay"
                },
                {
                  "name": "arg",
                  "optional": true
                },
                {
                  "name": "...",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "setTimeout(callback, delay[, arg][, ...])",
          "type": "method",
          "name": "setTimeout",
          "meta": {
            "added": [
              "v0.0.1"
            ]
          },
          "desc": "<p>Schedules execution of a one-time <code>callback</code> after <code>delay</code> milliseconds.\nReturns a <code>timeoutObject</code> for possible use with [<code>clearTimeout</code>][]. Additional\noptional arguments may be passed to the callback.</p>\n<p>The callback will likely not be invoked in precisely <code>delay</code> milliseconds.\nNode.js makes no guarantees about the exact timing of when callbacks will fire,\nnor of their ordering. The callback will be called as close as possible to the\ntime specified.</p>\n<p>To follow browser behavior, when using delays larger than 2147483647\nmilliseconds (approximately 25 days) or less than 1, the timeout is executed\nimmediately, as if the <code>delay</code> was set to 1.</p>\n",
          "signatures": [
            {
              "params": [
                {
                  "name": "callback"
                },
                {
                  "name": "delay"
                },
                {
                  "name": "arg",
                  "optional": true
                },
                {
                  "name": "...",
                  "optional": true
                }
              ]
            }
          ]
        },
        {
          "textRaw": "unref()",
          "type": "method",
          "name": "unref",
          "meta": {
            "added": [
              "v0.9.1"
            ]
          },
          "desc": "<p>The opaque value returned by [<code>setTimeout</code>][] and [<code>setInterval</code>][] also has the\nmethod <code>timer.unref()</code> which allows the creation of a timer that is active but\nif it is the only item left in the event loop, it won&#39;t keep the program\nrunning. If the timer is already <code>unref</code>d calling <code>unref</code> again will have no\neffect.</p>\n<p>In the case of [<code>setTimeout</code>][], <code>unref</code> creates a separate timer that will\nwakeup the event loop, creating too many of these may adversely effect event\nloop performance -- use wisely.</p>\n<p>Returns the timer.</p>\n",
          "signatures": [
            {
              "params": []
            }
          ]
        }
      ],
      "type": "module",
      "displayName": "Timers"
    }
  ]
}
