Class: TimerManager
@sapphire/time-utilities.TimerManager
Manages timers so that this application can be cleanly exited
Hierarchy
any
↳
TimerManager
Constructors
constructor
• new TimerManager()
Inherited from
null.constructor
Properties
storedIntervals
▪ Private
Static
storedIntervals: any
A set of intervals to clear on destroy
Defined in
node_modules/@sapphire/timer-manager/dist/index.d.ts:12
storedTimeouts
▪ Private
Static
storedTimeouts: any
A set of timeouts to clear on destroy
Defined in
node_modules/@sapphire/timer-manager/dist/index.d.ts:8
Methods
clearInterval
▸ Static
clearInterval(interval
): void
Clears an internal created through this class
Parameters
Name | Type | Description |
---|---|---|
interval | Timeout | The interval to clear |
Returns
void
Defined in
node_modules/@sapphire/timer-manager/dist/index.d.ts:36
clearTimeout
▸ Static
clearTimeout(timeout
): void
Clears a timeout created through this class
Parameters
Name | Type | Description |
---|---|---|
timeout | Timeout | The timeout to clear |
Returns
void
Defined in
node_modules/@sapphire/timer-manager/dist/index.d.ts:24
destroy
▸ Static
destroy(): void
Clears running timeouts and intervals created through this class so NodeJS can gracefully exit
Returns
void
Defined in
node_modules/@sapphire/timer-manager/dist/index.d.ts:40
setInterval
▸ Static
setInterval<A
>(fn
, delay
, ...args
): Timeout
Creates an interval gets cleared when destroyed
Type parameters
Name | Type |
---|---|
A | unknown |
Parameters
Name | Type | Description |
---|---|---|
fn | (...args : A []) => void | callback function |
delay | number | amount of time before running the callback |
...args | A [] | additional arguments to pass back to the callback |
Returns
Timeout
Defined in
node_modules/@sapphire/timer-manager/dist/index.d.ts:31
setTimeout
▸ Static
setTimeout<A
>(fn
, delay
, ...args
): Timeout
Creates a timeout gets cleared when destroyed
Type parameters
Name | Type |
---|---|
A | unknown |
Parameters
Name | Type | Description |
---|---|---|
fn | (...args : A []) => void | callback function |
delay | number | amount of time before running the callback |
...args | A [] | additional arguments to pass back to the callback |
Returns
Timeout
Defined in
node_modules/@sapphire/timer-manager/dist/index.d.ts:19