cxzl25 commented on PR #4598:
URL: https://github.com/apache/hadoop/pull/4598#issuecomment-1228251220

   > Sorry for the late response. But I did not get why System.nanoTime() may 
return a negative number. Do you mind to offer any jdk information? Thanks.
   > 
   > > System.nanoTime()may return a negative number, the comparison here may 
be wrong.
   
   https://docs.oracle.com/javase/8/docs/api/index.html
   
   public static long nanoTime()
   
   > (perhaps in the future, so values may be negative)
   > 
   >  one should use t1 - t0 < 0, not t1 < t0, because of the possibility of 
numerical overflow.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to