mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
common: reltimer_arg to access a timer argument.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
09459a97c7
commit
3018113012
@ -30,6 +30,11 @@ struct oneshot *new_reltimer_(struct timers *timers,
|
||||
return t;
|
||||
}
|
||||
|
||||
void *reltimer_arg(struct oneshot *t)
|
||||
{
|
||||
return t->arg;
|
||||
}
|
||||
|
||||
void timer_expired(tal_t *ctx, struct timer *timer)
|
||||
{
|
||||
struct oneshot *t = container_of(timer, struct oneshot, timer);
|
||||
|
@ -15,6 +15,9 @@ struct oneshot *new_reltimer_(struct timers *timers,
|
||||
new_reltimer_((timers), (ctx), (relexpire), \
|
||||
typesafe_cb(void, void *, (func), (arg)), (arg))
|
||||
|
||||
/* Get timer arg. */
|
||||
void *reltimer_arg(struct oneshot *t);
|
||||
|
||||
void timer_expired(tal_t *ctx, struct timer *timer);
|
||||
|
||||
#endif /* LIGHTNING_COMMON_TIMEOUT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user