Skip to content

Commit

Permalink
tools: record: don't bother setting last_ms to 0 on the first event
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
whot committed Aug 6, 2018
1 parent cf808a4 commit e33fd71
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tools/libinput-record.c
Expand Up @@ -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;

Expand Down

0 comments on commit e33fd71

Please sign in to comment.