timer: make the timer offset error a bit more user-friendly
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 31 Jan 2020 02:23:01 +0000 (12:23 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 31 Jan 2020 03:03:00 +0000 (13:03 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/timer.c
test/test-misc.c

index bc182393d654f638917e1d24943be1d34f8afb03..9d23d7904c15751b985e2d3c4e697617a19705e1 100644 (file)
@@ -93,7 +93,7 @@ libinput_timer_set_flags(struct libinput_timer *timer,
        if (expire < now) {
                if ((flags & TIMER_FLAG_ALLOW_NEGATIVE) == 0)
                        log_bug_client(timer->libinput,
-                                      "timer %s: offset negative (-%dms)\n",
+                                      "timer %s: scheduled expiry is in the past (-%dms), your system is too slow\n",
                                       timer->timer_name,
                                       us2ms(now - expire));
        } else if ((expire - now) > ms2us(5000)) {
index 9aa3c9e60bf0cdfb3d8966d3adbdfd74a8f83a47..b131cde9701aa5bd270ddde02f037fec1ba4c407 100644 (file)
@@ -660,7 +660,7 @@ static void timer_offset_warning(struct libinput *libinput,
        int *warning_triggered = (int*)libinput_get_user_data(libinput);
 
        if (priority == LIBINPUT_LOG_PRIORITY_ERROR &&
-           strstr(format, "offset negative"))
+           strstr(format, "scheduled expiry is in the past"))
                (*warning_triggered)++;
 }