logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tickit_watch_timer_at_* - invoke a callback at a fixed future time

Description

       The  tickit_watch_timer_at_*()  family  of  functions  register  a callback function to be invoked by the
       toplevel event loop at a fixed time in the future. A registered callback will be  invoked  by  a  running
       call  to  tickit_run(3).  The callback function will be invoked once, and then destroyed afterwards. Each
       function returns an opaque pointer value which serves to identify this instance. The info pointer will be
       NULL.

       When invoked, the callback function is always passed both TICKIT_EV_FIRE and  TICKIT_EV_UNBIND  flags  to
       its  flags  argument. If the callback had been registered with the TICKIT_BIND_DESTROY flag, then it will
       also be invoked with the TICKIT_EV_DESTROY flag if it has not yet been invoked by the time  the  toplevel
       instance is destroyed.

       If  cancelled  by  tickit_watch_cancel(3) the callback function is invoked with just the TICKIT_EV_UNBIND
       flag if it had been registered with TICKIT_BIND_UNBIND.

Name

       tickit_watch_timer_at_* - invoke a callback at a fixed future time

Return Value

tickit_watch_timer_at_epoch() and tickit_watch_timer_at_tv() return an opaque identifier pointer.

See Also

tickit_new_stdio(3),  tickit_watch_timer_after_msec(3),  tickit_watch_later(3),   tickit_watch_signal(3),
       tickit_watch_process(3), tickit_watch_cancel(3), tickit(7)

                                                                                  TICKIT_WATCH_TIMER_AT_EPOCH(3)

Synopsis

#include<tickit.h>typedefintTickitCallbackFn(Tickit*t,TickitEventflagsflags,void*info,void*user);void*tickit_watch_timer_at_epoch(Tickit*t,time_tat,TickitBindFlagsflags,TickitCallbackFn*fn,void*user);void*tickit_watch_timer_at_tv(Tickit*t,conststructtimeval*at,TickitBindFlagsflags,TickitCallbackFn*fn,void*user);

       Link with -ltickit.

See Also