export declare class IntervalError extends Error { readonly name = "IntervalError"; } /** * A wrapper around `setTimeout` that returns a controller that can cancel the * scheduled callback. */ export declare function schedule(time: number, callback: () => void): { cancel(): void; }; export type Input = { callback(time: number): void; interval: number; }; export type Output = { stop(): void; }; /** * Creates an auto-correcting timer and returns a controller that can stop the * timer. The callback will be called at every interval with the current time in * milliseconds. * * @throws {IntervalError} If the interval is less than or equal to `0`. */ export declare function timer({ callback, interval }: Input): Output; //# sourceMappingURL=Time.d.ts.map