Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript console log execution time

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 #console #log #execution #time
ADD COMMENT
Topic
Name
8+3 =