UNPKG

made-diagnostics

Version:
36 lines (35 loc) 996 B
/** * Defines a mechanism for measuring elapsed time. */ export declare class Stopwatch { private startTime; private endTime; /** * Gets a value indicating whether the Stopwatch is running. */ isRunning: boolean; /** * Gets the total elapsed time measured by the current instance, in milliseconds, once stopped. */ elapsedMilliseconds(): number; /** * Starts measuring elapsed time for an interval. */ start(): void; /** * Stops measuring elapsed time for an interval. */ stop(): void; /** * Stops time interval measurement and resets the elapsed time to zero. */ reset(): void; /** * Stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time. */ restart(): void; /** * Initializes a new Stopwatch instance, sets the elapsed time property to zero, and starts measuring elapsed time. */ static startNew(): Stopwatch; }