From d06cbd18c38ec80f916eef6c726b9e45e226d08f Mon Sep 17 00:00:00 2001 From: Richard Aas Date: Mon, 3 Jan 2011 19:19:25 +0000 Subject: [PATCH] added: tmr_isrunning() --- include/re_tmr.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/re_tmr.h b/include/re_tmr.h index be86b55..95491a1 100644 --- a/include/re_tmr.h +++ b/include/re_tmr.h @@ -31,3 +31,9 @@ void tmr_init(struct tmr *tmr); void tmr_start(struct tmr *tmr, uint64_t delay, tmr_h *th, void *arg); void tmr_cancel(struct tmr *tmr); uint64_t tmr_get_expire(const struct tmr *tmr); + + +static inline bool tmr_isrunning(const struct tmr *tmr) +{ + return tmr ? NULL != tmr->th : false; +}