From fa2e7e8949ad5728da4d3dfdd796a4f7e3e0e811 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 27 Oct 2017 07:26:15 +0000 Subject: =?UTF-8?q?Fix=20timeout=20calculation=20in=20epoll-based=20notifi?= =?UTF-8?q?er.=20Proposed=20fix=20for=20[1a6a36d901dedead248ea96df09d5dc15?= =?UTF-8?q?9532652|1a6a36d901].=20Patch=20by=20Lucio=20Andr=C3=A9s=20Illan?= =?UTF-8?q?es=20Albornoz.=20Thanks!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unix/tclEpollNotfy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 088f314..9d0053c 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -462,7 +462,10 @@ PlatformEventsWait( } else if (!timePtr->tv_sec && !timePtr->tv_usec) { timeout = 0; } else { - timeout = (int)timePtr->tv_sec; + timeout = (int)timePtr->tv_sec * 1000; + if (timePtr->tv_usec) { + timeout += (int)timePtr->tv_usec / 1000; + } } /* -- cgit v0.12