commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de.INVALID>
Subject usage of System.currentTimeMillis();
Date Wed, 24 Oct 2018 11:17:59 GMT
Hi folks!
While fixing a deadlock in commons-pool I also stumbled across System.currentTimeMillis();quite
a few times.It's no biggie but I would still love to get your feedback and experience.
If I remember correctly then one should use Sytem.nanoTime() in those cases.a.) afair currentTimeMIllis()
might jump back in time (on NTP syncs, etc).b.) on Linux currentTimeMillis might be way more
expensive than System.nanoTime(); Mainly depending on whether the underlying HPET is used
(slow) or another timer source.

What is your experience? Is this still correct?Or is this gone with new boards and more recent
JVMs?
LieGrue,strub

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message