virajjasani commented on pull request #3302:
URL: https://github.com/apache/hbase/pull/3302#issuecomment-850502504


   > 
https://stackoverflow.com/questions/19052316/why-is-system-nanotime-way-slower-in-performance-than-system-currenttimemill
   
   As per the Oracle blog (link to blog is obsolete): If you are interested in 
measuring/calculating elapsed time, then always use System.nanoTime(). On most 
systems it will give a resolution on the order of microseconds. Be aware 
though, this call can also take microseconds to execute on some platforms.
   
   It looks like, unless we are too specific about elapsed time that we want 
only nanosecond level elapsed time, we should prefer System#currentTimeMillis 
for the perf benefit.


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to