📌  相关文章
📜  javascript 执行时间 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:51.256000             🧑  作者: Mango

代码示例2
const { JSDOM } = require("jsdom");
const { window } = new JSDOM();
 
var start = window.performance.now();
 
// task starts
for (var i = 0; i < 100000000;i++);
// task ends
 
var end = window.performance.now();
console.log(`Execution time: ${end - start} ms`);