Switch from storing total seconds to storing deltas.
This is conceptually simpler and makes the files easier to manipulate and concatenate. It also avoids a bug where we would send a large negative time when we loop for multiple playbacks.
This commit is contained in:
parent
0d0d14cc39
commit
8985f990cb
2 changed files with 4 additions and 6 deletions
|
|
@ -73,6 +73,8 @@ int dump_event(struct timespec* start, struct input_event* event, char* type) {
|
|||
fprintf(stderr, "Unknown event type.\n");
|
||||
return 1;
|
||||
}
|
||||
start->tv_sec = now.tv_sec;
|
||||
start->tv_nsec = now.tv_nsec;
|
||||
|
||||
printf("%ld %ld,%s,%s\n",
|
||||
diff.tv_sec,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue