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

Use finest granularity clock (System.nanoTime) for sleep, wait, util.Timer ...

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      A DESCRIPTION OF THE REQUEST :
      Currently two clock granularities exist in the Linux hotspot version. One that is more coarse grain for the methods on an Object like wait, and on a Thread like sleep, and util.Timer framework. The other new System.nanoTime uses the more fine grained clock. It would provide consistency to use the finest grain clock for all timing related activities.

       NOTE: It also would improve the JVM to implement System.nanosecond method using the POSIX Clock_gettime() call rather than the get time of day call. Clock_gettime returns a more fine clock granularity.

      JUSTIFICATION :
      Having two differing clocks in the JVM is misleading and can be error prone.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      One clock of the finest granularity permitted by the operating system driving the JVM.
      ###@###.### 2005-07-19 11:43:31 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jssunw Jitender S (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: