summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-08-06 14:06:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-08-06 14:06:48 +1000
commite33fd7157f293e3f894b174b8bd3134bfd51685b (patch)
tree1f844761f43d11c2ca14091d5f447de9838a3bcf
parentcf808a408f6acdc2cd10196c0c59b279568c7b63 (diff)
tools: record: don't bother setting last_ms to 0 on the first event
The first event we receive is set to a 0ms offset anyway. Setting last_ms to 0 on the first event means the first two events have +0ms offset printed to the log. Skip it, so the second event has the right offset. This is human-readable data only, no effect on the recording file itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tools/libinput-record.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/libinput-record.c b/tools/libinput-record.c
index 169947df..0f1cb174 100644
--- a/tools/libinput-record.c
+++ b/tools/libinput-record.c
@@ -215,8 +215,6 @@ print_evdev_event(struct record_context *ctx, struct input_event *ev)
unsigned long time, dt;
time = us2ms(tv2us(&ev->time));
- if (last_ms == 0)
- last_ms = time;
dt = time - last_ms;
last_ms = time;