Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-982

Use System.nanoTime() to measure time intervals

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Core, Flume Appender
    • None

    Description

      Unlike System.currentTimeMillis(), which can jump/slew forward and backwards, System.nanoTime() is a monotonic clock (at least it should be) and hence it should be used to measure time intervals (timeouts/delays/etc).

      Attachments

        1. flume-nano.diff
          5 kB
          Gary D. Gregory
        2. LOG4J2-982.patch
          15 kB
          Mikhail Mazursky
        3. LOG4J2-982-v2.patch
          20 kB
          Mikhail Mazursky
        4. LOG4J2-982-v3.patch
          20 kB
          Mikhail Mazursky
        5. LOG4J2-982-v4.patch
          20 kB
          Mikhail Mazursky

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ash2k Mikhail Mazursky
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: