参见performance.now()
performance.now()
当前时间以毫秒为单位的时间戳
2.0.0
const start = getPerformanceNow();// 执行一些操作...const end = getPerformanceNow();console.log('耗时:', end - start, 'ms'); Copy
const start = getPerformanceNow();// 执行一些操作...const end = getPerformanceNow();console.log('耗时:', end - start, 'ms');
参见
performance.now()