1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fixed regression

This commit is contained in:
Steffen Vogel 2017-07-07 00:01:17 +02:00
parent f641b55355
commit 2fef0864a8

View file

@ -117,18 +117,17 @@ int signal_read(struct node *n, struct sample *smps[], unsigned cnt)
struct sample *t = smps[0];
struct timespec now;
int steps;
assert(cnt == 1);
/* Throttle output if desired */
if (s->rt) {
/* Block until 1/p->rate seconds elapsed */
int steps = timerfd_wait(s->tfd);
steps = timerfd_wait(s->tfd);
if (steps > 1)
warn("Missed steps: %u", steps);
s->counter += steps;
now = time_now();
}
else {
@ -136,7 +135,7 @@ int signal_read(struct node *n, struct sample *smps[], unsigned cnt)
now = time_add(&s->started, &offset);
s->counter += 1;
steps = 1;
}
double running = time_delta(&s->started, &now);
@ -162,6 +161,8 @@ int signal_read(struct node *n, struct sample *smps[], unsigned cnt)
killme(SIGTERM);
}
s->counter += steps;
return 1;
}