B.W.
0
Q:

Javascript measure function run time

var startTime = performance.now();

alert('Run some function here');

var endTime = performance.now();
var totalTime=endTime-startTime;// time took to run in milliseconds

alert('Total time:'+totalTime +'ms');
3

New to Communities?

Join the community