性能监控代码


var log = function(msg){

     if(window.console){

            var now = new Date - 0;

            var last = arguments.callee.last;

             if(typeof last === "number"){

               window.console.log(msg +"        :       "+(now-last)+" ms");

            }

            arguments.callee.last = now;

     }

}

你可能感兴趣的:(性能)