mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
timeout: remove absolute timers.
We don't actually use them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
3aca5c87e3
commit
c5de5d4c39
2 changed files with 3 additions and 21 deletions
|
@ -15,12 +15,13 @@ static void remove_timer(struct oneshot *t)
|
|||
timer_del(&t->dstate->timers, &t->timer);
|
||||
}
|
||||
|
||||
struct oneshot *new_abstimer_(struct lightningd_state *dstate,
|
||||
struct oneshot *new_reltimer_(struct lightningd_state *dstate,
|
||||
const tal_t *ctx,
|
||||
struct timeabs expiry,
|
||||
struct timerel relexpiry,
|
||||
void (*cb)(void *), void *arg)
|
||||
{
|
||||
struct oneshot *t = tal(ctx, struct oneshot);
|
||||
struct timeabs expiry = timeabs_add(controlled_time(), relexpiry);
|
||||
|
||||
t->cb = cb;
|
||||
t->arg = arg;
|
||||
|
@ -32,16 +33,6 @@ struct oneshot *new_abstimer_(struct lightningd_state *dstate,
|
|||
return t;
|
||||
}
|
||||
|
||||
struct oneshot *new_reltimer_(struct lightningd_state *dstate,
|
||||
const tal_t *ctx,
|
||||
struct timerel relexpiry,
|
||||
void (*cb)(void *), void *arg)
|
||||
{
|
||||
return new_abstimer_(dstate, ctx,
|
||||
timeabs_add(controlled_time(), relexpiry),
|
||||
cb, arg);
|
||||
}
|
||||
|
||||
void timer_expired(struct lightningd_state *dstate, struct timer *timer)
|
||||
{
|
||||
struct oneshot *t = container_of(timer, struct oneshot, timer);
|
||||
|
|
|
@ -17,15 +17,6 @@ struct oneshot *new_reltimer_(struct lightningd_state *dstate,
|
|||
new_reltimer_((dstate), (ctx), (relexpire), \
|
||||
typesafe_cb(void, void *, (func), (arg)), (arg))
|
||||
|
||||
struct oneshot *new_abstimer_(struct lightningd_state *dstate,
|
||||
const tal_t *ctx,
|
||||
struct timeabs expire,
|
||||
void (*cb)(void *), void *arg);
|
||||
|
||||
#define new_abstimer(dstate, ctx, absexpire, func, arg) \
|
||||
new_abstimer_((dstate), (ctx), (absexpire), \
|
||||
typesafe_cb(void, void *, (func), (arg)), (arg))
|
||||
|
||||
void timer_expired(struct lightningd_state *dstate, struct timer *timer);
|
||||
|
||||
#endif /* LIGHTNING_DAEMON_TIMEOUT_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue