fix check time

back_recharge
wangyuan 2019-11-14 14:53:09 +08:00
parent e224d50506
commit ed7bd22bd7
1 changed files with 2 additions and 2 deletions

View File

@ -91,13 +91,13 @@ public class ThreadManager {
scheduledExecutor.scheduleAtFixedRate(new Thread(){
public void run () {
long lastMilis = System.currentTimeMillis();
try { Thread.sleep(10000L); } catch (InterruptedException e) { }
try { Thread.sleep(1000L); } catch (InterruptedException e) { }
long millis = System.currentTimeMillis();
if((millis - lastMilis)-10000>5000||(millis - lastMilis)-10000<-5000){
reStart();
}
}
}, delayForMinute, 10, TimeUnit.SECONDS);
}, delayForMinute, 1, TimeUnit.SECONDS);
scheduledExecutor.execute(new RetrySendIndicationThread("retry_send"));
scheduledExecutor.execute(dataReportTask);
scheduledExecutor.execute(mongoDataHandlerTask);