From 20c8675ba46bda97330a4117c459a59a9f1c465e Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Iniesta Date: Mon, 21 Nov 2016 09:37:33 +0100 Subject: New upstream version 2.4~beta1 --- src/openvpn/interval.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/openvpn/interval.h') diff --git a/src/openvpn/interval.h b/src/openvpn/interval.h index 4814ec9..59eb1f6 100644 --- a/src/openvpn/interval.h +++ b/src/openvpn/interval.h @@ -185,6 +185,15 @@ event_timeout_modify_wakeup (struct event_timeout* et, interval_t n) et->n = (n >= 0) ? n : 0; } +/* + * Will return the time left for a timeout, this function does not check + * if the timeout is actually valid + */ +static inline interval_t event_timeout_remaining (struct event_timeout* et) +{ + return (int) et->last + et->n - now; +} + /* * This is the principal function for testing and triggering recurring * timers and will return true on a timer signal event. -- cgit v1.2.3