diff --git a/src/io/piethernet.cpp b/src/io/piethernet.cpp index 635748bf..43fc5199 100755 --- a/src/io/piethernet.cpp +++ b/src/io/piethernet.cpp @@ -300,11 +300,15 @@ void PIEthernet::applyTimeouts() { void PIEthernet::applyTimeout(int fd, int opt, double ms) { if (fd == 0) return; + //piCoutObj << "setReadIsBlocking" << yes; +#ifdef WINDOWS + DWORD tm = ms; +#else double s = ms / 1000.; timeval tm; tm.tv_sec = piFloord(s); s -= tm.tv_sec; tm.tv_usec = s * 1000000.; - //piCoutObj << "setReadIsBlocking" << yes; +#endif ethSetsockopt(fd, SOL_SOCKET, opt, &tm, sizeof(tm)); }