diff options
-rw-r--r-- | src/evdev.c | 2 | ||||
-rw-r--r-- | src/timer.c | 5 | ||||
-rw-r--r-- | test/test-misc.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c index cf0a2846..860f69df 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1113,7 +1113,7 @@ evdev_note_time_delay(struct evdev_device *device, return; tdelta = us2ms(libinput->dispatch_time - eventtime); - if (tdelta > 10) { + if (tdelta > 20) { evdev_log_bug_client_ratelimit(device, &device->delay_warning_limit, "event processing lagging behind by %dms, your system is too slow\n", diff --git a/src/timer.c b/src/timer.c index e1d8dd60..da3f5931 100644 --- a/src/timer.c +++ b/src/timer.c @@ -92,9 +92,12 @@ libinput_timer_set_flags(struct libinput_timer *timer, uint32_t flags) { #ifndef NDEBUG + /* We only warn if we're more than 20ms behind */ + const uint64_t timer_warning_limit = ms2us(20); uint64_t now = libinput_now(timer->libinput); if (expire < now) { - if ((flags & TIMER_FLAG_ALLOW_NEGATIVE) == 0) + if ((flags & TIMER_FLAG_ALLOW_NEGATIVE) == 0 && + now - expire > timer_warning_limit) log_bug_client_ratelimit(timer->libinput, &timer->libinput->timer.expiry_in_past_limit, "timer %s: scheduled expiry is in the past (-%dms), your system is too slow\n", diff --git a/test/test-misc.c b/test/test-misc.c index 732cb12e..5f98d326 100644 --- a/test/test-misc.c +++ b/test/test-misc.c @@ -721,7 +721,7 @@ START_TEST(timer_delay_bug_warning) for (int i = 0; i < 20; i++) { litest_event(dev, EV_REL, REL_X, -1); litest_event(dev, EV_SYN, SYN_REPORT, 0); - msleep(11); + msleep(21); libinput_dispatch(li); } |