aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/event-loop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport/event-loop.cc')
-rw-r--r--gdbsupport/event-loop.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbsupport/event-loop.cc b/gdbsupport/event-loop.cc
index c080490..e7b21e7 100644
--- a/gdbsupport/event-loop.cc
+++ b/gdbsupport/event-loop.cc
@@ -827,7 +827,8 @@ update_wait_timeout (void)
/* Update the timeout for select/ poll. */
#ifdef HAVE_POLL
if (use_poll)
- gdb_notifier.poll_timeout = timeout.tv_sec * 1000;
+ gdb_notifier.poll_timeout = (timeout.tv_sec * 1000 +
+ (timeout.tv_usec + 1000 - 1) / 1000);
else
#endif /* HAVE_POLL */
{