Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8109833

TimeLine does not tic properly and was working with 1.2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • fx1.3
    • javafx

      The issue is referenced in this thread:

      http://forums.sun.com/thread.jspa?threadID=5445370&tstart=0

      This simple code

      import javafx.animation.Timeline;
      import javafx.animation.KeyFrame;
      import java.util.Date;
      import java.text.SimpleDateFormat;


      public function run() {
          def formatter = new SimpleDateFormat("hh:mm:ss a");
          def timeline:Timeline = Timeline {

                      repeatCount: Timeline.INDEFINITE
                      keyFrames: [
                          KeyFrame {

                              time: 1s
                              action: function() {
                                  println(formatter.format(new Date()));
                              }
                          }
                      ]
                  }
          timeline.playFromStart();

      }

      Gets this output

      06:41:51 PM
      06:41:54 PM
      06:41:57 PM
      06:42:00 PM
      06:42:03 PM
      06:42:06 PM
      06:42:08 PM
      06:42:12 PM
      06:42:15 PM
      06:42:17 PM
      06:42:20 PM
      06:42:23 PM

      So the "tic" is done in 3-4s instead of in 1s. My Computer is a Core 2 Duo E8500 at 3,16Ghz and if I reduce the 1s to 250ms I get the "tics" every second. This code was working for an analog/digital clock on javafx 1.2 and now it doesn't

            mheinrichs Michael Heinrichs (Inactive)
            anruizjfx Ander Ruiz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: