/ Published in: JavaScript
Expand |
Embed | Plain Text
var start = new Date().getTime(); for (i = 0; i < 50000; ++i) { // do something } var end = new Date().getTime(); var time = end - start; alert('Execution time: ' + time);
Comments
Subscribe to comments
You need to login to post a comment.

Also read this post about time measure in JS: http://ejohn.org/blog/accuracy-of-javascript-time/