diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-06-15 01:01:48 +0900 |
---|---|---|
committer | The Plumber <50238977+systemd-rhel-bot@users.noreply.github.com> | 2021-07-21 14:15:58 +0200 |
commit | b79e00d8f97b8c959c5b17f0547c680f86dd9132 (patch) | |
tree | 6073a5f44eae71c4a3a6e0a5c574652b0d565f6f | |
parent | 7419222d3811d60c0a8f5ea27778108a1ca8ee71 (diff) | |
download | systemd-b79e00d8f97b8c959c5b17f0547c680f86dd9132.tar.gz |
sd-event: use usec_add()
(cherry picked from commit a595fb5ca9c69c589e758e9ebe3b70ac90450ba3)
Related: #1968528
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 6a20b658e4..f675c09d84 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -3514,8 +3514,8 @@ static int arm_watchdog(sd_event *e) { assert(e->watchdog_fd >= 0); t = sleep_between(e, - e->watchdog_last + (e->watchdog_period / 2), - e->watchdog_last + (e->watchdog_period * 3 / 4)); + usec_add(e->watchdog_last, (e->watchdog_period / 2)), + usec_add(e->watchdog_last, (e->watchdog_period * 3 / 4))); timespec_store(&its.it_value, t); |