Ivan Andika created HDDS-12060:
----------------------------------

             Summary: 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


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