You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
670 B
23 lines
670 B
9 years ago
|
#ifndef LIGHTNING_DAEMON_TIMEOUT_H
|
||
|
#define LIGHTNING_DAEMON_TIMEOUT_H
|
||
|
#include "config.h"
|
||
|
|
||
9 years ago
|
#include <ccan/tal/tal.h>
|
||
9 years ago
|
#include <ccan/time/time.h>
|
||
|
#include <ccan/timer/timer.h>
|
||
|
#include <ccan/typesafe_cb/typesafe_cb.h>
|
||
|
|
||
9 years ago
|
/* tal_free this to disable timer. */
|
||
8 years ago
|
struct oneshot *new_reltimer_(struct timers *timers,
|
||
9 years ago
|
const tal_t *ctx,
|
||
|
struct timerel expire,
|
||
|
void (*cb)(void *), void *arg);
|
||
9 years ago
|
|
||
8 years ago
|
#define new_reltimer(timers, ctx, relexpire, func, arg) \
|
||
|
new_reltimer_((timers), (ctx), (relexpire), \
|
||
9 years ago
|
typesafe_cb(void, void *, (func), (arg)), (arg))
|
||
9 years ago
|
|
||
8 years ago
|
void timer_expired(tal_t *ctx, struct timer *timer);
|
||
9 years ago
|
|
||
9 years ago
|
#endif /* LIGHTNING_DAEMON_TIMEOUT_H */
|