summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ev.c b/ev.c
index a6f414f..eba23b6 100644
--- a/ev.c
+++ b/ev.c
@@ -2489,6 +2489,12 @@ ev_timer_again (EV_P_ ev_timer *w)
EV_FREQUENT_CHECK;
}
+ev_tstamp
+ev_timer_remaining (EV_P_ ev_timer *w)
+{
+ return ev_at (w) - (ev_is_active (w) ? mn_now : 0.);
+}
+
#if EV_PERIODIC_ENABLE
void noinline
ev_periodic_start (EV_P_ ev_periodic *w)