summaryrefslogtreecommitdiffstats
path: root/otime.h
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-09 21:13:57 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-09 21:13:57 +0000
commit9423103dab10cd5b933e4f6e574f37e33457ca96 (patch)
tree014ae81167ddf95ff33cb4e6859d4dc8582ce998 /otime.h
parentba2ebecbedee53f00575b607e0a6c873b97ca4d1 (diff)
downloadopenvpn-9423103dab10cd5b933e4f6e574f37e33457ca96.tar.gz
openvpn-9423103dab10cd5b933e4f6e574f37e33457ca96.tar.xz
openvpn-9423103dab10cd5b933e4f6e574f37e33457ca96.zip
Backed out change to update_time to handle time
backtracks. Will reimplement as a more comprehensive patch. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@790 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'otime.h')
-rw-r--r--otime.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/otime.h b/otime.h
index 09a85c7..974d0af 100644
--- a/otime.h
+++ b/otime.h
@@ -55,16 +55,13 @@ const char *tv_string (const struct timeval *tv, struct gc_arena *gc);
const char *tv_string_abs (const struct timeval *tv, struct gc_arena *gc);
extern volatile time_t now; /* updated frequently to time(NULL) */
-extern unsigned int now_adj;
static inline void
update_time (void)
{
- const time_t real_time = time (NULL) + now_adj;
- if (real_time > now)
+ const time_t real_time = time (NULL);
+ if (real_time != now)
now = real_time;
- else if (real_time < now)
- now_adj += (now - real_time);
}
static inline void