forked from upstream-mirrors/OpenTracks
merge heads
This commit is contained in:
@@ -72,11 +72,7 @@ public class TimerTaskExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
long now = System.currentTimeMillis();
|
long next = System.currentTimeMillis() + interval - (tripStatistics.getTotalTime() % interval);
|
||||||
long next = tripStatistics.getStartTime();
|
|
||||||
if (next < now) {
|
|
||||||
next = now + interval - ((now - next) % interval);
|
|
||||||
}
|
|
||||||
timer.scheduleAtFixedRate(new PeriodicTimerTask(), new Date(next), interval);
|
timer.scheduleAtFixedRate(new PeriodicTimerTask(), new Date(next), interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user