jfChrono
Simple class for using chronometers and timers in applications.
Usage
Examples
Getting AJAX request time for stats
const jfChrono = ;const chrono = ;ajax;chronostart;ajax;
Timers
Timer can be stopped and resumed using methods startTimer
and stopTimer
.
const jfChrono = ;let count = 1;{ console; chrono;}{ chrono; if ++count < 5 ; else console; }const chrono = ;chronostart;;
Timing actions
You can use several timers if you want to create reports of all actions taken.
{ console; console; console; console;}const jfChrono = ;jfChronostart;// Preparing actionsjfChronostart;// Parse files// ...// ...jfChrono;jfChronostart;// Analyze files// ...// ...jfChrono;jfChronostart;// Creating reports// ...// ...jfChrono;jfChrono;// ...;