RFR of 8069269: (spec) Defect in the System.nanoTime spec
brian.burkhalter at oracle.com
Tue Jan 27 01:03:28 UTC 2015
On Jan 26, 2015, at 4:59 PM, Martin Buchholz <martinrb at google.com> wrote:
> Looks good to me! The best feature of the new code sample is that it not only prevents overflow in the elapsed time computation, but also overflow when adding to the timeout, and the latter is far more likely in practice since users have good reasons to pick Integer.MAX_VALUE and MIN_VALUE as "infinite" timeouts.
> Of course, we paranoid folks know better and think MAX_VALUE / 2 is plenty infinite enough!
More information about the core-libs-dev