import '../../globals.js';
import TinyEmitter from './TinyEmitter.js';
export type TimerListener = (dt: number) => void;
export default class Timer extends TinyEmitter<[number]> {
    /**
     * Adds a listener to be called back once after the specified time in milliseconds
     * @param listener - called with no arguments
     * @param timeout in milliseconds
     * @returns an internally-wrapped listener which can be removed with clearTimeout
     */
    setTimeout(listener: () => void, timeout: number): TimerListener;
    /**
     * Clear a scheduled timeout. If there was no timeout, nothing is done.
     */
    clearTimeout(listener: TimerListener): void;
    /**
     * Adds a listener to be called at specified intervals (in milliseconds)
     * @param listener - called with no arguments
     * @param interval - in milliseconds
     * @returns an internally-wrapped listener which can be removed with clearInterval
     */
    setInterval(listener: () => void, interval: number): TimerListener;
    /**
     * Clear a scheduled interval. If there was no interval, nothing is done.
     */
    clearInterval(listener: TimerListener): void;
    /**
     * Run a callback on the next frame. This method is largely for clarity.
     */
    runOnNextTick(listener: () => void): void;
}
//# sourceMappingURL=Timer.d.ts.map