Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 1.55 KB

README.md

File metadata and controls

50 lines (44 loc) · 1.55 KB

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 - [email protected] - https://www.hrdns.de You can read the license here

Greets and Thanks