diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-03-22 14:10:59 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-03-27 09:10:33 +0200 |
commit | 008e2df4779d2153b96f2982d21a81abf4b1be93 (patch) | |
tree | de8a0273473f569f19f83f6147b41feec42f08a0 /src | |
parent | 8e066237a7b56e0f1d50c223c2a50298a491bfd7 (diff) | |
download | strongswan-008e2df4779d2153b96f2982d21a81abf4b1be93.tar.bz2 strongswan-008e2df4779d2153b96f2982d21a81abf4b1be93.tar.xz |
pluto: Use time_monotonic() instead of a custom implementation.
Diffstat (limited to 'src')
-rw-r--r-- | src/pluto/timer.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/pluto/timer.c b/src/pluto/timer.c index c1ad55f5e..1d34d2c54 100644 --- a/src/pluto/timer.c +++ b/src/pluto/timer.c @@ -46,18 +46,7 @@ */ time_t now(void) { - static time_t delta = 0 - , last_time = 0; - time_t n = time(NULL); - - passert(n != (time_t)-1); - if (last_time > n) - { - plog("time moved backwards %ld seconds", (long)(last_time - n)); - delta += last_time - n; - } - last_time = n; - return n + delta; + return time_monotonic(NULL); } /* This file has the event handling routines. Events are |