What should Timertask.scheduleAtFixedRate do if the clock changes?
Looking at the source of Timer for Java 1.7, it appears that is uses System.currentTimeMillis() to determine the next execution of a task. However, looking at the source of ScheduledThreadPoolExecutor, it uses System.nanoTime(). Which means you won’t see that behaviour if you use one in place of a Timer. To create one, use, for instance, … Read more