Linux rounds microseconds in socket timeouts up to the HZ kernel parameter, Windows rounds down to milliseconds. To bypass separate checking this OS-specific behavior, pick the timeout long enough so that it is whole number of HZ for any reasonable HZ value (and also whole number of milliseconds).
Changes only in the tests.
This branch contains also commit of @mcepl which restores back tests of test_util
suite.