title: How to change AnimationTimer speed?
body: <p>I use <code>AnimationTimer</code> for several tasks like animation with changing pictures and <code>ProgressIndicator</code> animation. To achieve needed speed I put thread to sleep, but when several animations are running simultaneously they affect each others speed. Is there any other way to change speed of <code>AnimationTimer</code>? Code sample:</p>
  
  <pre><code>private void initialize() {
   programButtonAnimation=new AnimationTimer(){
              @Override
              public void handle(long now) {
                      showClockAnimation();
              }
          };
   programButtonAnimation.start();
  }
  
  private void showClockAnimation(){
      String imageName = "%s_"+"%05d"+".%s";
      String picturePath="t093760/diploma/view/styles/images/pink_frames/"+String.format( imageName,"pink" ,frameCount,"png");
      programButton.setStyle("-fx-background-image:url('"+picturePath+"')");
      frameCount++;
      try {
          Thread.sleep(28);
      } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      if(frameCount&gt;=120){
          programButtonAnimation.stop();
          frameCount=0;
      }
  }
  </code></pre>