Lines Matching defs:timer
6 struct timer {
18 __type(value, struct timer);
28 static int timer_cb(void *map, int *key, struct timer *timer)
35 struct timer *timer;
38 timer = bpf_map_lookup_elem(&timers, &key);
39 if (timer) {
40 bpf_timer_init(&timer->t, &timers, CLOCK_MONOTONIC);
41 bpf_timer_set_callback(&timer->t, timer_cb);
42 bpf_timer_start(&timer->t, 10E9, 0);
43 bpf_timer_cancel(&timer->t);