Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18417

StopWatch may provide incorrect measurements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.14.5, 3.18.1
    • 3.19.0
    • None
    • None
    • Unknown

    Description

      The StopWatch in camel-util is based on the System clock and uses it to calculate durations. However, the system clock is not an appropriate source for measuring durations because it can go back in time or have time leaps that do not reflect reality (ex.: when changing standard time to daylight saving and vice versa, when having micro adjustments due to NTP synchronization, when the date is manually changed, etc).

       

      We should probably investigating replacing the source with Java's high resolution timer or (potentially) the Duration class.

       

      Attachments

        Issue Links

          Activity

            People

              orpiske Otavio Rodolfo Piske
              orpiske Otavio Rodolfo Piske
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: