If you are trying to inspect timings in JavaScript, you can use console.time
and console.timeEnd
which will write to your browser console.
Example:
console.time('lengthy calculation');
lengthyCalculation();
console.timeEnd('lengthy calculation');
lengthy calculation: 1.337ms
Note that this allows using console.timeEnd
in another context which is helpful when you are doing things asynchronously, or just in different places.
Works in all browsers, including recent Internet Explorers. For older IEs, you may activate Firebug Lite to get these commands.
Posted by Arne Hartherz to makandra dev (2014-03-17 14:05)