Timing for optimization purposes:
Say you have a function f. To time the function with arguments arg0, arg1 & arg2 doCode:Function.prototype.time = function() { var sTime = new Date(); this.apply(null,arguments); var eTime = new Date(); return eTime.getTime() - sTime.getTime(); };
Code:f.time(arg0,arg1,arg2);


Reply With Quote
Bookmarks