A basic stop watch timing object for JavaScript.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
package.json
stoptime.js
stoptime.min.js

README.md

stoptime

A basic stop watch timing object for JavaScript.

Install

stable

npm install stoptime

edge

npm install https://github.com/daxxog/stoptime/tarball/master

Usage

(function() {
    var watch = stoptime();
    setTimeout(function() {
        console.log(watch.elapsed());
    }, 100);
    setTimeout(function() {
        console.log(watch.reset().elapsed());
    }, 200);
    setTimeout(function() {
        console.log(watch.elapsed());
    }, 300);
})();