📅  最后修改于: 2022-03-11 15:03:51.902000             🧑  作者: Mango
function calculate() {
let start = Date.now();
for (let count = 0; count < 100000; count++) {
dice = Math.ceil(Math.random() * 6);
}
let elapsed = Date.now() - start;
document.getElementById("lesstime").innerHTML = "The elapsed time was " + elapsed + " milleseconds. ";
}