schedule2:function (callback, interval) {
varthen = Date.now();
interval = interval*1000;
this.schedule(function(){
varnow = Date.now();
vardelta = now - then;
if(delta > interval){
then = now - (delta % interval);
callback.call(this);
}
}.bind(this), 0);
}
参考 https://www.cnblogs.com/kenkofox/p/4138048.html