let t0 = window.performance.now();
doSomething();
let t1 = window.performance.now();
console.log("doSomething函数执行了" + (t1 - t0) + "毫秒.")
performance.now() 方法返回一个以毫秒为单位的 DOMHighResTimeStamp 精确到千分之五毫秒(5微秒)
未完待续....
let t0 = window.performance.now();
doSomething();
let t1 = window.performance.now();
console.log("doSomething函数执行了" + (t1 - t0) + "毫秒.")
performance.now() 方法返回一个以毫秒为单位的 DOMHighResTimeStamp 精确到千分之五毫秒(5微秒)
未完待续....