mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fixed invalid first timer event
This commit is contained in:
parent
79aa626d50
commit
dba5fe7696
1 changed files with 5 additions and 2 deletions
|
@ -14,9 +14,12 @@
|
|||
int timerfd_create_rate(double rate)
|
||||
{
|
||||
int fd, ret;
|
||||
|
||||
struct timespec ts = time_from_double(1 / rate);
|
||||
|
||||
struct itimerspec its = {
|
||||
.it_interval = time_from_double(1 / rate),
|
||||
.it_value = { 0, 1 }
|
||||
.it_interval = ts,
|
||||
.it_value = ts
|
||||
};
|
||||
|
||||
fd = timerfd_create(CLOCK_MONOTONIC, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue