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 invalid first timer event

This commit is contained in:
Steffen Vogel 2016-02-07 03:18:07 +01:00
parent 79aa626d50
commit dba5fe7696

View file

@ -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);