Namespace: TimerUtils

Oracle® JavaScript Extension Toolkit (JET)
17.1.0

G12196-01

Since:
  • 4.1.0
Module:
  • ojtimerutils

QuickNav

Description

Timing related utilities


Usage

For additional information visit:


Timing related utilities

Methods

(static) getTimer(timeout) : {Timer}

Get a Timer object with the given timeout in milliseconds. The Promise associated with the timer is resolved when the timeout window expires, or if the clear() function is called. This is useful for when code needs to be executed on timeout (setTimeout) and must handle cleanup tasks such as clearing BusyState when the timer expires or is canceled.
Parameters:
Name Type Description
timeout number The timeout value in milliseconds to wait before the promise is resolved.
Returns:

A Timer object which encapsulates the Promise that will be resolved once the timeout has been exceeded or cleared.

Type
Timer