t1=new Date();
其他执行的语句;
t2 = new Date();
t3 = t2.getTime()-t1.getTime();
minut = Math.floor(t3/(60*1000));
leave = t3%(60*1000);
secon=Math.round(leave/1000);
t1=new Date();
其他执行的语句;
t2 = new Date();
t3 = t2.getTime()-t1.getTime();
minut = Math.floor(t3/(60*1000));
leave = t3%(60*1000);
secon=Math.round(leave/1000);
转载于:https://www.cnblogs.com/dylAlex/p/10497683.html