UNPKG

logger-timer

Version:

A quick shortcut to adding a bunch of timers and dumping their deltas.

19 lines (18 loc) 520 B
export interface LoggerTimerOptions { isActive: boolean; dumpThreshold: number; } export declare class LoggerTimer { private timerStarts; private timerStops; private isActive; private dumpThreshold; constructor(opts?: LoggerTimerOptions); startTimer(timerName: string): void; stopTimer(timerName: string): void; setActive(isActive: boolean): void; getTimerDeltas(): { [timer: string]: number; }; dumpTimers(cb?: (args: any) => void): void; }