diff options
Diffstat (limited to 'src/alarm.c')
-rw-r--r-- | src/alarm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/alarm.c b/src/alarm.c index 7352ccb..4b23bd1 100644 --- a/src/alarm.c +++ b/src/alarm.c @@ -70,6 +70,14 @@ void del_alarm(struct alarm_list *alarm) list_del_init(&alarm->head); } +int alarm_pending(struct alarm_list *alarm) +{ + if (list_empty(&alarm->head)) + return 0; + + return 1; +} + static struct timeval * calculate_next_run(struct timeval *cand, struct timeval *tv, |