summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-10-27 07:26:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-10-27 07:26:15 (GMT)
commitfa2e7e8949ad5728da4d3dfdd796a4f7e3e0e811 (patch)
tree2facf0efe77ae236d38758ef8578c22da7985b53 /unix
parentd5f679a3f608fabb7954ae203eff8f37b2e1747b (diff)
downloadtcl-fa2e7e8949ad5728da4d3dfdd796a4f7e3e0e811.zip
tcl-fa2e7e8949ad5728da4d3dfdd796a4f7e3e0e811.tar.gz
tcl-fa2e7e8949ad5728da4d3dfdd796a4f7e3e0e811.tar.bz2
Fix timeout calculation in epoll-based notifier. Proposed fix for [1a6a36d901dedead248ea96df09d5dc159532652|1a6a36d901]. Patch by Lucio Andrés Illanes Albornoz. Thanks!
Diffstat (limited to 'unix')
-rw-r--r--unix/tclEpollNotfy.c5
1 files changed, 4 insertions, 1 deletions
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;
+ }
}
/*