const sleep= (time)=> new Promise((resolve)=>{ setTimeout(resolve,time) })
const t0 = window.performance.now(); doSomething(); const t1 = window.performance.now(); console.log("doSomething 函数执行了" + (t1 - t0) + "毫秒。")
京公网安备 11010502049817号