JDK 9 RFR of 8165664: (ch) sun.nio.ch.SocketAdaptor does not respect timeout in case of system date/time change and blocks

Brian Burkhalter brian.burkhalter at oracle.com
Mon Dec 19 20:10:04 UTC 2016

I initially used nanos directly and a couple of tests failed. I suppose I should find out why rather than devolving to this version of the patch.

On Dec 19, 2016, at 12:08 PM, Martin Buchholz <martinrb at google.com> wrote:

> It's probably best (and traditional) to work with an internal long nanos field anyways, so there are no millisecond sized roundoff errors.
> I sometimes find it easier to understand if I define a deadline
> final long deadline = System.nanoTime() + nanosTimeout;
> I would do unit conversions using methods from TimeUnit.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20161219/88a64567/attachment.html>

More information about the nio-dev mailing list