GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • timers.js
  • Timeout

This view

  • Original page
  • New address

GeezerVison is showing docs.pythonmonkey.io — PythonMonkey: Timeout Class Reference

Logo
PythonMonkey   v1.5.1 (dev)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Timeout Class Reference

Public Member Functions

 constructor (numericId)
 
 hasRef ()
 
 ref ()
 
 unref ()
 
 refresh ()
 
 close ()
 

Detailed Description

Implement Node.js-style timeoutId class returned from setTimeout() and setInterval()

See also
https://nodejs.org/api/timers.html#class-timeout

Member Function Documentation

◆ close()

Timeout::close ( )

Cancels the timeout.

Deprecated:
legacy Node.js API. Use clearTimeout() instead

◆ constructor()

Timeout::constructor (   numericId)

@type {number} an integer

Parameters
{number}numericId

◆ hasRef()

Timeout::hasRef ( )

If true, the Timeout object will keep the event-loop active.

Returns
{boolean}

◆ ref()

Timeout::ref ( )

When called, requests that the event-loop not exit so long as the Timeout is active.

By default, all Timeout objects are "ref'ed", making it normally unnecessary to call timeout.ref() unless timeout.unref() had been called previously.

◆ refresh()

Timeout::refresh ( )

Sets the timer's start time to the current time, and reschedules the timer to call its callback at the previously specified duration adjusted to the current time.

Using this on a timer that has already called its callback will reactivate the timer.

◆ unref()

Timeout::unref ( )

When called, the active Timeout object will not require the event-loop to remain active.
If there is no other activity keeping the event-loop running, the process may exit before the Timeout object's callback is invoked.


The documentation for this class was generated from the following file:
  • python/pythonmonkey/builtin_modules/timers.js
  • Timeout
  • Generated on Wed Nov 11 2026 19:06:42 for PythonMonkey by doxygen 1.9.7
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.