@drift-labs/common
Version:
Common functions for Drift
16 lines (15 loc) • 544 B
TypeScript
/**
* A Dev Tool to help with performance analysis.
*
* The stopwatch class should function as a "timer" for a variety of unique keys. Any time a caller calls the "tick" method, with a key, the stopwatch will log the time since the last tick for that key.
*/
export declare class Stopwatch {
private _lastTick;
constructor();
/**
* Logs the time since the last tick for the given key.
* @param key The key to log the time for.
*/
tick(key: string, message?: string): void;
blankTick(key: string): void;
}