import { Event } from "./Event"; /** * Timer that uses requestAnimationFrame() (or manual updates) to emit elapsed frame time in seconds. */ export declare class Timer extends Event { private lastTime; private raf; private rafCB; /** Multiplier to actual time elapsed to apply to the emitted time elapsed. */ speed: number; constructor(); /** * Ticks the timer. This can be called manually, and will calculate the time since the last call. */ tick(): void; /** Tick with a specific amount of time, instead of calculating actual time. */ tickOverride(elapsedSeconds: number): void; /** * Resets the last time for calculating elapsed time. * If you are manually ticking the timer, call this after pauses so that the first tick doesn't include * all of the paused time in its elapsed value. */ resetElapsed(): void; /** * Starts the timer. */ start(): void; /** * Stops the timer. */ stop(): void; } /** * A global timer for code anywhere to attach to. This timer does not automatically start, so if you use code * that relies on it you will need to start or tick it yourself. */ export declare const globalTimer: Timer;