aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--otime.c1
-rw-r--r--otime.h7
2 files changed, 2 insertions, 6 deletions
diff --git a/otime.c b/otime.c
index 14a52af..ad9cbbf 100644
--- a/otime.c
+++ b/otime.c
@@ -35,7 +35,6 @@
#include "memdbg.h"
volatile time_t now; /* GLOBAL */
-unsigned int now_adj = 0; /* GLOBAL */
/*
* Return a numerical string describing a struct timeval.
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