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

Increase the precision of the implementation of java.time.Clock.systemUTC()

    XMLWordPrintable

Details

    • b50
    • Verified

    Backports

      Description

        The java.time.Clock.system() method (and variants thereof) are specified to "obtain a clock that returns the current instant using best available system clock". However the current implementation of the clock returned is based on System.currentTimeMillis() whereas the underlying native clock used by System.currentTimeMillis() has often a greater precision than milliseconds (for instance, on Linux, System.currentTimeMillis() is based on gettimeofday, which offers microseconds precision).

        This RFE propose to enhance the implementation of the system clocks returned by java.time.Clock, so that they offer at least the same precision than the underlying clock available on the system.

        Attachments

          Issue Links

            Activity

              People

                dfuchs Daniel Fuchs
                dfuchs Daniel Fuchs
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: