stoptime

A basic stop watch timing object for JavaScript.

npm install stoptime
4 downloads in the last month

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);
})();
npm loves you