On 24/09/2019 16:32, Milan Mimica wrote:
:
I looked into it and found this:
The difference is how Java_sun_nio_ch_Net_poll is implemented. On unix
it uses poll(2), on Windows it uses select(2). Regarding timeouts,
poll() has "wait at least"[2] semantics and overruns by design, while
select() on windows has "waits at most" semantics, or how they put
it: "specifies the maximum time that select should wait before
returning."[3]. It returns early by design! Old, "plain" socket impl
are not much different.
System.nanoTime is implemented on QueryPerformanceCounter to read the
high res time stamp. It's not clear which timer is used by Windows to
support select (and WSAPoll) - were you able to get any info on that?
-Alan