You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2022/08/30 09:24:00 UTC

[jira] [Resolved] (CAMEL-18417) StopWatch may provide incorrect measurements

     [ https://issues.apache.org/jira/browse/CAMEL-18417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Otavio Rodolfo Piske resolved CAMEL-18417.
------------------------------------------
    Resolution: Fixed

Closing as it is fixed.

> StopWatch may provide incorrect measurements
> --------------------------------------------
>
>                 Key: CAMEL-18417
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18417
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 3.14.5, 3.18.1
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Minor
>             Fix For: 3.19.0
>
>
> 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.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)