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

Chia-Chuan Yu reassigned HDDS-12060:
------------------------------------

    Assignee: Chia-Chuan Yu

> Replace System.currentTimeMillis() with Time.monotonicNow() for duration 
> calculation
> ------------------------------------------------------------------------------------
>
>                 Key: HDDS-12060
>                 URL: https://issues.apache.org/jira/browse/HDDS-12060
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Ivan Andika
>            Assignee: Chia-Chuan Yu
>            Priority: Major
>
> A lot of duration calculations are still using System.currentTimeMillis. 
> However, from the description of Time.now (which calls 
> System.currentTimeMillis)
> {quote}Current system time. Do not use this to calculate a duration or 
> interval to sleep, because it will be broken by settimeofday. Instead, use 
> monotonicNow.
> {quote}
> Therefore, we should replace them with Time.monotonicNow / 
> Time.monotonicNowNanos to prevent the duration calculation being broken by 
> settimeofday.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to