/stopwatchjs

StopWatchJS is a JS clone from symfony/stopwatch.

Primary LanguageJavaScriptMIT LicenseMIT

HRDNS StopWatchJS

StopWatchJS is a javascript clone from Stopwatch Component.
The Symfony "Stopwatch Component" is copyright by Fabien Potencier.
Please read his license.

The API is unstable and can change from commit to commit!

Installation

Composer

https://packagist.org/packages/sgc-fireball/stopwatchjs

composer require sgc-fireball/stopwatchjs

Bower

http://bower.io/search/?q=hrdns-stopwatchjs

bower install hrdns-stopwatchjs

Usage

define(['StopWatch/StopWatch'],function(StopWatch){
    StopWatch.start('loading','section');
    // do something
    var section = StopWatch.openSection('nameOfSection');
    // do something
    section.start('eventName','category');
    // do something
    section.stop('eventName');
    // do something
    StopWatch.closeSection('nameOfSection');
    // do something
    StopWatch.stop('loading');
});

Example

requirejs.png

Copyright and License

Richard Hülsberg - rh+github@hrdns.de - https://www.hrdns.de You can read the license here

Greets and Thanks