struct pollfd fds[ctx->ndevices + 2];
unsigned int nfds = 0;
struct record_device *d = NULL;
- struct record_device *first_device = NULL;
- struct timespec ts;
sigset_t mask;
assert(ctx->timeout != 0);
* start time. Otherwise, the first event starts the recording time.
*/
if (ctx->ndevices > 1) {
+ struct timespec ts;
+
clock_gettime(CLOCK_MONOTONIC, &ts);
ctx->offset = s2us(ts.tv_sec) + ns2us(ts.tv_nsec);
}
do {
int rc;
bool had_events = false; /* we delete files without events */
+ struct record_device *first_device = NULL;
if (!open_output_file(ctx, autorestart)) {
fprintf(stderr,