scheduledThreadPool.scheduleAtFixedRate() strange behaviour
<p>I have this simple test: </p>

<pre><code>import java.util.Timer;
import java.util.TimerTask;

public class ScheduleTest {

  private static long last;

  public static void main(String[] args) {

    last = System.currentTimeMillis();

    Timer timer = new Timer();
    timer.schedule(new TimerTask() {

      @Override
      public void run() {
        Long current = System.currentTimeMillis();
        System.out.println(current - last);
        last = current;

      }
    }, 0, 1000);
  }
}
</code></pre>

<p>which give me expected result:</p>

<blockquote>
  <p>0<br>
  1000<br>
  1000<br>
  1000</p>
</blockquote>

<p>If I replace Timer by a ScheduleThreadPoool, it gives me weird result:</p>

<pre><code>import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class ScheduleTest {

  private static long last;

  public static void main(String[] args) {

    last = System.currentTimeMillis();

    ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(1);

    last = System.currentTimeMillis();
    scheduledThreadPool.scheduleAtFixedRate(new Runnable() {

      @Override
      public void run() {

        Long current = System.currentTimeMillis();
        System.out.println(current - last);
        last = current;

      }
    }, 0, 1000, TimeUnit.MILLISECONDS);
  }
}
</code></pre>

<p>Result:</p>

<blockquote>
<pre><code>0
2359
2079
2312
1844
2266
</code></pre>
</blockquote>

<p>Any expectation?</p>
