title: Spring @Scheduled timer accuracy
body: <p>I'm using spring-boot <code>@Scheduled</code> annotation with fixedDelay in milliseconds as documented in javadoc:</p>
  
  <blockquote>
    <p>Execute the annotated method with a fixed period in milliseconds between the end of the last invocation and the start of the next.</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>@Scheduled(fixedDelay=1000)
  public void task() {
      LOG.info("START: " + System.currentTimeInMillis());
      ....do some work here...
      LOG.info("END: " + System.currentTimeInMillis());
  }
  </code></pre>
  
  <p>And sometimes I get such output that time between previous task end and next task starts is less than <code>1000ms</code> for about <code>2-30 milliseconds</code>.</p>
  
  <p>Is it normal due to some granularity or why is it happening? Is there any guaranties about this delta value?</p>