igir
Version:
🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
19 lines (18 loc) • 518 B
TypeScript
/**
* A wrapper to centrally manage Node.js timeouts.
*/
export default class Timer {
private static readonly TIMERS;
private readonly timeoutId;
private constructor();
static setTimeout(runnable: (...args: unknown[]) => void, timeoutMillis: number): Timer;
static setInterval(runnable: (...args: unknown[]) => void, timeoutMillis: number): Timer;
/**
* Cancel all pending timeouts.
*/
static cancelAll(): void;
/**
* Cancel this timeout.
*/
cancel(): void;
}