Otherwise events that are already queued before the first libinput_dispatch()
have a negative timestamp.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
struct libinput *li;
struct timespec tp;
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+ start_time = tp.tv_sec * 1000 + tp.tv_nsec / 1000000;
+
tools_init_context(&context);
if (tools_parse_args(argc, argv, &context))
if (!li)
return 1;
- clock_gettime(CLOCK_MONOTONIC, &tp);
- start_time = tp.tv_sec * 1000 + tp.tv_nsec / 1000000;
-
mainloop(li);
libinput_unref(li);