---
name: "tickit_watch_timer_at_tv"
section: "3"
platform: "linux"
package: "libtickit-dev"
version: "0.4.3-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tickit_watch_timer_at_tv"
---

# tickit\_watch\_timer\_at\_tv(3)

invoke a callback at a fixed future time

## NAME

tickit\_watch\_timer\_at\_\* - invoke a callback at a fixed future time

## SYNOPSIS

```
#include <tickit.h>

typedef int TickitCallbackFn(Tickit *t, TickitEventflags flags,
    void *info, void *user);

void *tickit_watch_timer_at_epoch(Tickit *t, time_t at,
    TickitBindFlags flags, TickitCallbackFn *fn, void *user);
void *tickit_watch_timer_at_tv(Tickit *t, const struct timeval *at,
    TickitBindFlags flags, TickitCallbackFn *fn, void *user);
```

Link with *-ltickit*.

## 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)](/tickit_run/3.md). 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)](/tickit_watch_cancel/3.md) the callback function is invoked with just the **TICKIT\_EV\_UNBIND** flag if it had been registered with **TICKIT\_BIND\_UNBIND**.

## 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_new_stdio/3.md), [**tickit\_watch\_timer\_after\_msec**(3)](/tickit_watch_timer_after_msec/3.md), [**tickit\_watch\_later**(3)](/tickit_watch_later/3.md), [**tickit\_watch\_signal**(3)](/tickit_watch_signal/3.md), [**tickit\_watch\_process**(3)](/tickit_watch_process/3.md), [**tickit\_watch\_cancel**(3)](/tickit_watch_cancel/3.md), [**tickit**(7)](/tickit/7.md)
