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:
parent
f641b55355
commit
2fef0864a8
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue