参见performance.now()
performance.now()
当前时间以微秒为单位的时间戳
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()