UNPKG

559 BTypeScriptView Raw
1/**
2 * A single timer
3 */
4export declare class Timer {
5 readonly label: string;
6 timeMs?: number;
7 private startTime;
8 constructor(label: string);
9 start(): void;
10 end(): void;
11 isSet(): boolean;
12 humanTime(): string;
13}
14/**
15 * A collection of Timers
16 */
17export declare class Timers {
18 private readonly timers;
19 record<T>(label: string, operation: () => T): T;
20 recordAsync<T>(label: string, operation: () => Promise<T>): Promise<T>;
21 start(label: string): Timer;
22 display(): string;
23}
24//# sourceMappingURL=timer.d.ts.map
\No newline at end of file