aboutsummaryrefslogtreecommitdiff
path: root/interval.h
diff options
context:
space:
mode:
Diffstat (limited to 'interval.h')
-rw-r--r--interval.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/interval.h b/interval.h
index afba948..f0e5875 100644
--- a/interval.h
+++ b/interval.h
@@ -177,6 +177,14 @@ event_timeout_reset (struct event_timeout* et)
et->last = now;
}
+static inline void
+event_timeout_modify_wakeup (struct event_timeout* et, interval_t n)
+{
+ /* note that you might need to call reset_coarse_timers after this */
+ if (et->defined)
+ et->n = (n >= 0) ? n : 0;
+}
+
/*
* This is the principal function for testing and triggering recurring
* timers and will return true on a timer signal event.