AGStopwatch is built using TypeScript. It's just a basic stopwatch - you can start it, stop it, restart it, and check how much time has elapsed.
npm install agstopwatch
Use it in your code using:
var Stopwatch = ;
This is a constructor function. You MUST call it with the new keyword:
var sw = ;
Starts the stopwatch.
Stops the stopwatch.
Clears current start time and restarts the stopwatch.
Clears current start and end time and stops the stopwatch.
The time the stopwatch was started (in ms).
The time the stopwatch was stopped (in ms).
The time elapsed (in ms).
Returns true if the stopwatch is running.