On Jan 26, 2015, at 4:59 PM, Martin Buchholz <marti...@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.

Good point.

> Of course, we paranoid folks know better and think MAX_VALUE / 2 is plenty 
> infinite enough!

Quite so!

Reply via email to