UNPKG

300 BJavaScriptView Raw
1
2function logTime(func){
3 return function(){
4 var start = (new Date()).getTime();
5 var returned = func();
6 var end = (new Date()).getTime();
7 console.log(func.name+' executed in '+Math.round(end-start)+'ms.');
8 return returned;
9 };
10}
11
12module.exports = {
13 noop: function(){},
14 logTime: logTime
15};
\No newline at end of file