summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-04-04 07:08:30 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-04-11 13:02:19 +1000
commit5152d94cd26a2d4533b5267c5affffa34a45e293 (patch)
tree0425a5a2e8cc7cb14f596de7bd6b19fb58af1cd2
parentc830f51b2e1e4fa37d9ec3849d2807c139ebef05 (diff)
timer: print the wrong offset when we have a negative timer offset bug
Makes it easier to determine if this is a libinput bug or something triggered by the caller waiting too long to call libinput_dispatch(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/timer.c b/src/timer.c
index 5ad23f31..c9247942 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -73,7 +73,8 @@ libinput_timer_set(struct libinput_timer *timer, uint64_t expire)
uint64_t now = libinput_now(timer->libinput);
if (expire < now)
log_bug_libinput(timer->libinput,
- "timer offset negative\n");
+ "timer offset negative (-%" PRIu64 ")\n",
+ now - expire);
else if ((expire - now) > ms2us(5000))
log_bug_libinput(timer->libinput,
"timer offset more than 5s, now %"