.\" Automatically generated man page, do not edit .TH QB_LOOP_TIMER_ADD 3 2021-03-03 "LIBQB" "libqb Programmer's Manual" .SH NAME qb_loop_timer_add \- Add a timer to the mainloop. .SH SYNOPSIS .nf .B #include .sp \fBint32_t qb_loop_timer_add\fP( \fBqb_loop_t *\fP\fIl\fP, \fBenum qb_loop_priority \fP\fIp\fP, \fBuint64_t \fP\fInsec_duration\fP, \fBvoid *\fP\fIdata\fP, \fBqb_loop_timer_dispatch_fn \fP\fIdispatch_fn\fP, \fBqb_loop_timer_handle *\fP\fItimer_handle_out\fP ); .fi .SH PARAMS \fBl \fP\fIpointer to the loop instance \fP .PP \fBp \fP\fIthe priority \fP .PP \fBnsec_duration \fP\fInano-secs in the future to run the dispatch. \fP .PP \fBdata \fP\fIuser data passed into the dispatch function \fP .PP \fBdispatch_fn \fP\fIcallback function \fP .PP \fBtimer_handle_out \fP\fIhandle to delete the timer if needed. \fP .PP .SH DESCRIPTION .SH STRUCTURES .nf \fB enum qb_loop_priority { \fIQB_LOOP_LOW\fP; \fIQB_LOOP_MED\fP; \fIQB_LOOP_HIGH\fP; }; \fP .fi .PP .RE .SH RETURN VALUE .PP status (0 == ok, -errno == failure) .PP .SH NOTE .PP it is a one-shot job. .SH SEE ALSO .PP .nh .ad l \fIqb_loop_job_del\fR(3), \fIqb_loop_run\fR(3), \fIqb_loop_create\fR(3), \fIqb_loop_stop\fR(3), \fIqb_loop_poll_low_fds_event_set\fR(3), \fIqb_loop_signal_del\fR(3), \fIqb_loop_signal_add\fR(3), \fIqb_loop_job_add\fR(3), \fIqb_loop_poll_del\fR(3), \fIqb_loop_destroy\fR(3), \fIqb_loop_timer_expire_time_remaining\fR(3), \fIqb_loop_poll_mod\fR(3), \fIqb_loop_signal_mod\fR(3), \fIqb_loop_timer_del\fR(3), \fIqb_loop_timer_is_running\fR(3), \fIqb_loop_timer_expire_time_get\fR(3), \fIqb_loop_poll_add\fR(3) .ad .hy .SH "COPYRIGHT" .PP Copyright (C) 2010-2020 Red Hat, Inc.