tools: refuse to replay recordings with timestamps from the future

This indicates a bug in libinput record, might as well complain about it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-01-30 09:47:51 +10:00
parent acfec31103
commit 8e35a2f949

View file

@ -116,6 +116,10 @@ def replay(device, verbose):
# offset is the offset from the first event on any device.
offset = time.time() - device['__first_event_offset']
if offset < 0:
error('WARNING: event time offset is in the future, refusing to replay')
return
# each 'evdev' set contains one SYN_REPORT so we only need to check for
# the time offset once per event
for event in events: