Skip to content

Latest commit

 

History

History
33 lines (29 loc) · 528 Bytes

README.md

File metadata and controls

33 lines (29 loc) · 528 Bytes

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