sd-event: use usec_add()

This commit is contained in:
Yu Watanabe 2021-06-15 01:01:48 +09:00
parent 06e131477d
commit a595fb5ca9

View file

@ -3677,8 +3677,8 @@ static int arm_watchdog(sd_event *e) {
assert(e->watchdog_fd >= 0); assert(e->watchdog_fd >= 0);
t = sleep_between(e, t = sleep_between(e,
e->watchdog_last + (e->watchdog_period / 2), usec_add(e->watchdog_last, (e->watchdog_period / 2)),
e->watchdog_last + (e->watchdog_period * 3 / 4)); usec_add(e->watchdog_last, (e->watchdog_period * 3 / 4)));
timespec_store(&its.it_value, t); timespec_store(&its.it_value, t);