Licence
LGPL-3.0-only
Version
7.0.3
Deps
0
Vulns
0
Weekly
5.6K
DeprecatedThis package is deprecated
Deprecated. Use
@ariestools/sdkinstead. This package is a backward-compatibility re-export shim.
@xylabs/timer
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Install
Using npm:
npm install @xylabs/timerUsing yarn:
yarn add @xylabs/timerUsing pnpm:
pnpm add @xylabs/timerUsing bun:
bun add @xylabs/timerLicense
See the LICENSE file for license rights and limitations (LGPL-3.0-only).
Reference
packages
timer
### .temp-typedoc
### functions
### <a id="clearTimeoutEx"></a>clearTimeoutEx
function clearTimeoutEx(id): void;Cancels a timeout previously created with setTimeoutEx.
Parameters
id
string
The timeout ID returned by setTimeoutEx.
Returns
void
### <a id="setTimeoutEx"></a>setTimeoutEx
function setTimeoutEx(func, delay): string;Sets a timeout using an optimized internal timer that coalesces multiple timeouts into a single native timer.
Parameters
func
Function
The function to call after the delay.
delay
number
The delay in milliseconds (must be >= 0).
Returns
string
A unique string ID that can be used with clearTimeoutEx to cancel the timeout.