diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-11-21 09:37:33 +0100 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-11-21 09:37:33 +0100 |
commit | 20c8675ba46bda97330a4117c459a59a9f1c465e (patch) | |
tree | d888c714fb61947dd79dc44b64a4aaae2f70bfb7 /src/openvpn/interval.h | |
parent | ffca24bed7a03d95585ad02278667abe75d8b272 (diff) |
New upstream version 2.4~beta1upstream/2.4_beta1
Diffstat (limited to 'src/openvpn/interval.h')
-rw-r--r-- | src/openvpn/interval.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ -186,6 +186,15 @@ event_timeout_modify_wakeup (struct event_timeout* et, interval_t n) } /* + * 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. * If et_const_retry == ETT_DEFAULT and a signal occurs, |