Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript time execution

var t0 = performance.now();

doSomething();   // <---- The function you're measuring time for 

var t1 = performance.now();
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #time #execution
ADD COMMENT
Topic
Name
7+2 =