Lines Matching defs:timer
1431 static int post_change_thunk(sd_event_source *timer, uint64_t usec, void *userdata) {
1440 sd_event_source *timer;
1447 timer = f->post_change_timer;
1449 r = sd_event_source_get_enabled(timer, &enabled);
1451 log_debug_errno(r, "Failed to get ftruncate timer state: %m");
1458 r = sd_event_now(sd_event_source_get_event(timer), CLOCK_MONOTONIC, &now);
1464 r = sd_event_source_set_time(timer, now+f->post_change_timer_period);
1470 r = sd_event_source_set_enabled(timer, SD_EVENT_ONESHOT);
1483 /* Enable coalesced change posting in a timer on the provided sd_event instance */
1485 _cleanup_(sd_event_source_unrefp) sd_event_source *timer = NULL;
1493 r = sd_event_add_time(e, &timer, CLOCK_MONOTONIC, 0, 0, post_change_thunk, f);
1497 r = sd_event_source_set_enabled(timer, SD_EVENT_OFF);
1501 f->post_change_timer = timer;
1502 timer = NULL;