timer: make the timer offset error a bit more user-friendly

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-01-31 12:23:01 +10:00
parent da9eace8db
commit 5e25bdfb03
2 changed files with 2 additions and 2 deletions

View 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)) {

View 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)++;
}