📜  javascript 计算时间 - Javascript 代码示例

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

代码示例3
var start = new Date().getTime();

for (i = 0; i < 50000; ++i) {
// do something
}

var end = new Date().getTime();
var time = end - start;
alert('Execution time: ' + time);