多个consoletime怎么匹配
可以使用相应的console.timeEnd()方法来匹配console.time()。每个console.time()方法都会给定一个唯一的标识符,用于相应的console.timeEnd()方法来匹配。例如:
console.time('timer1');
// some code
console.timeEnd('timer1');
console.time('timer2');
// some code
console.timeEnd('timer2');
在上面的示例中,我们使用不同的标识符“timer1”和“timer2”来匹配相应的时间测量。
原文地址: https://www.cveoy.top/t/topic/hcfa 著作权归作者所有。请勿转载和采集!