.TH TICKIT_WATCH_LATER 3 .SH NAME tickit_watch_later \- invoke a callback at the next round of IO events .SH SYNOPSIS .EX .B #include .sp .BI "typedef int " TickitCallbackFn "(Tickit *" t ", TickitEventflags " flags , .BI " void *" info ", void *" user ); .sp .BI "void *tickit_watch_later(Tickit *" t ", TickitBindFlags " flags , .BI " TickitCallbackFn *" fn ", void *" user ); .EE .sp Link with \fI\-ltickit\fP. .SH DESCRIPTION \fBtickit_watch_later\fP() registers a callback function to be invoked by the toplevel event loop as it processes the next round of IO events. A registered callback will be invoked by a running call to \fBtickit_run\fP(3). The callback function will be invoked once, and then destroyed afterwards. The \fIinfo\fP pointer will be \fBNULL\fP. .PP When invoked, the callback function is always passed both \fBTICKIT_EV_FIRE\fP and \fBTICKIT_EV_UNBIND\fP flags to its \fIflags\fP argument. If the callback had been registered with the \fBTICKIT_BIND_DESTROY\fP flag, then it will also be invoked with the \fBTICKIT_EV_DESTROY\fP flag if it has not yet been invoked by the time the toplevel instance is destroyed. .PP If registered with the \fBTICKIT_BIND_FIRST\fP flag, the callback will be inserted at the start of the queue, coming before others. If not, it is appended at the end. .PP If cancelled by \fBtickit_watch_cancel\fP(3) the callback function is invoked with just the \fBTICKIT_EV_UNBIND\fP flag if it had been registered with \fBTICKIT_BIND_UNBIND\fP. .SH "RETURN VALUE" \fBtickit_watch_later\fP() returns an opaque identifier pointer. .SH "SEE ALSO" .BR tickit_new_stdio (3), .BR tickit_watch_io (3), .BR tickit_watch_timer_after_msec (3), .BR tickit_watch_timer_at_epoch (3), .BR tickit_watch_signal (3), .BR tickit_watch_process (3), .BR tickit_watch_cancel (3), .BR tickit (7)