📅  最后修改于: 2022-03-11 15:03:29.248000             🧑  作者: Mango
var startTime = performance.now();
alert('Run some function here');
var endTime = performance.now();
var totalTime=endTime-startTime;// time took to run in milliseconds
alert('Total time:'+totalTime +'ms');