@rushstack/operation-graph
Version:
Library for managing and executing operations in a directed acyclic graph.
47 lines • 1.26 kB
TypeScript
/**
* Represents a typical timer/stopwatch which keeps track
* of elapsed time in between two events.
*
* @public
*/
export declare class Stopwatch {
private _startTime;
private _endTime;
private _running;
constructor();
/**
* Static helper function which creates a stopwatch which is immediately started
*/
static start(): Stopwatch;
get isRunning(): boolean;
/**
* Starts the stopwatch. Note that if end() has been called,
* reset() should be called before calling start() again.
*/
start(): Stopwatch;
/**
* Stops executing the stopwatch and saves the current timestamp
*/
stop(): Stopwatch;
/**
* Resets all values of the stopwatch back to the original
*/
reset(): Stopwatch;
/**
* Displays how long the stopwatch has been executing in a human readable format.
*/
toString(): string;
/**
* Get the duration in seconds.
*/
get duration(): number;
/**
* Return the start time of the most recent stopwatch run.
*/
get startTime(): number | undefined;
/**
* Return the end time of the most recent stopwatch run.
*/
get endTime(): number | undefined;
}
//# sourceMappingURL=Stopwatch.d.ts.map