diff --git a/common/clock.c b/common/clock.c index 79c06c8dd..f322db815 100644 --- a/common/clock.c +++ b/common/clock.c @@ -27,6 +27,7 @@ #include #include #include +#include static struct clocksource *current_clock; static uint64_t time_ns; @@ -139,6 +140,9 @@ uint32_t clocksource_hz2mult(uint32_t hz, uint32_t shift_constant) int is_timeout(uint64_t start_ns, uint64_t time_offset_ns) { + if (time_offset_ns >= 100 * USECOND) + poller_call(); + if ((int64_t)(start_ns + time_offset_ns - get_time_ns()) < 0) return 1; else diff --git a/common/console.c b/common/console.c index cab868925..88c40101a 100644 --- a/common/console.c +++ b/common/console.c @@ -225,8 +225,6 @@ int getc(void) */ start = get_time_ns(); while (1) { - poller_call(); - if (tstc_raw()) { kfifo_putc(console_input_buffer, getc_raw());