1.1.0 • Published 11 years ago

agstopwatch v1.1.0

Weekly downloads
341
License
-
Repository
github
Last release
11 years ago

#AGStopwatch

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.

Install using:

npm install agstopwatch

Use it in your code using:

Typescript:

import Stopwatch = require("agstopwatch");

JavaScript:

var Stopwatch = require("agstopwatch");

##Usage ###Stopwatch This is a constructor function. You MUST call it with the new keyword:

var sw = new Stopwatch();

###Stopwatch.start() Starts the stopwatch.

###Stopwatch.stop() Stops the stopwatch.

###Stopwatch.restart() Resets the stopwatch.

###Stopwatch.startTime The time the stopwatch was started (in ms).

###Stopwatch.stopTime The time the stopwatch was stopped (in ms).

###Stopwatch.elapsed The time elapsed (in ms).

1.1.0

11 years ago

1.0.0

11 years ago