diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index 49f1a7450..0e01aabe3 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -1007,7 +1007,7 @@ io_loop(void *data) { if (has_pending_wakeups) { now = monotonic(); double time_delta = OPT(input_delay) - (now - last_main_loop_wakeup_at); - if (time_delta >= 0) ret = poll(fds, self->count + EXTRA_FDS, time_delta); + if (time_delta >= 0) ret = poll(fds, self->count + EXTRA_FDS, (int)ceil(1000 * time_delta)); else ret = 0; } else { ret = poll(fds, self->count + EXTRA_FDS, -1);