求取时间差

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);

猜你喜欢

转载自www.cnblogs.com/dylAlex/p/10497683.html