/** * A pollable cooldown handle. */ export interface CooldownHandle { readonly ready: boolean; reset(): void; } /** * Pause-aware game timer providing delay, interval, and cooldown primitives. * * All times are in game-time milliseconds. When the game is paused, `tick()` is simply not called, so all timers * freeze automatically. */ export declare class GameTimer { private _nextId; private _delays; private _intervals; private _cooldowns; /** * One-shot timer. Fires the callback after `ms` milliseconds of game time. * * @returns A cancel function that prevents the callback from firing. */ delay(ms: number, callback: () => void): () => void; /** * Repeating timer. Fires the callback every `ms` milliseconds of game time. * * @returns A cancel function that stops the interval. */ interval(ms: number, callback: () => void): () => void; /** * Pollable cooldown. Starts ready; after calling `reset()`, becomes not-ready until `ms` elapses. */ cooldown(ms: number): CooldownHandle; /** * Cancel all active delays, intervals, and cooldowns. */ cancelAll(): void; /** * Advance all timers by `dtMs` milliseconds. Called once per frame by the game loop. */ tick(dtMs: number): void; }