Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
5.4.1, 6.0
-
None
-
None
-
New
Description
Re-phrased from steve_rowe's comment :
System.nanoTime(), which is guaranteed to be monotonic, is now used to recored elapsed times. In several places, conversion from nano seconds to some target unit (e.g. seconds, milli seconds) is performed using hard-coded conversion constants, which is prone to mistakes.
It would be nice to use TimeUnit.TARGETUNIT.convert(sourceDuration, TimeUnit.SOURCEUNIT) instead.