assert_se(sd_ndisc_set_mac(nd, &mac_addr) >= 0);
assert_se(sd_ndisc_set_callback(nd, test_callback, e) >= 0);
- assert_se(sd_event_add_time(e, &test_hangcheck, clock_boottime_or_monotonic(),
- time_now + 30 * USEC_PER_SEC, 0,
- test_rs_hangcheck, NULL) >= 0);
+ assert_se(sd_event_add_time_relative(
+ e, &test_hangcheck, clock_boottime_or_monotonic(),
- 2 *USEC_PER_SEC, 0,
++ 30 * USEC_PER_SEC, 0,
+ test_rs_hangcheck, NULL) >= 0);
assert_se(sd_ndisc_stop(nd) >= 0);
assert_se(sd_ndisc_start(nd) >= 0);
assert_se(sd_ndisc_set_ifindex(nd, 42) >= 0);
assert_se(sd_ndisc_set_mac(nd, &mac_addr) >= 0);
- assert_se(sd_event_add_time(e, &test_hangcheck, clock_boottime_or_monotonic(),
- time_now + 30 * USEC_PER_SEC, 0,
- test_rs_hangcheck, NULL) >= 0);
+ assert_se(sd_event_add_time_relative(
+ e, &test_hangcheck, clock_boottime_or_monotonic(),
- 2U * USEC_PER_SEC, 0,
++ 30 * USEC_PER_SEC, 0,
+ test_rs_hangcheck, NULL) >= 0);
assert_se(sd_ndisc_start(nd) >= 0);