aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-21 17:33:49 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-22 09:49:13 -0400
commit9426751b72e922b5ee2b00bcc6158f5651a81014 (patch)
tree08b063dca1b75c7239ed62554b0cc851ea6b026e /src/common/util.h
parentd1cada5a8a7e1631e25f5f413c66d5c9e5113e7a (diff)
downloadtor-9426751b72e922b5ee2b00bcc6158f5651a81014.tar.gz
tor-9426751b72e922b5ee2b00bcc6158f5651a81014.zip
Extract our code for answering "what time is it right now".
The other time stuff is higher-level
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 916bddc1fe..f2df84b194 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -24,6 +24,7 @@
#endif
#include "lib/err/torerr.h"
#include "lib/malloc/util_malloc.h"
+#include "lib/wallclock/approx_time.h"
#include "common/util_bug.h"
#ifndef O_BINARY
@@ -178,15 +179,6 @@ int parse_iso_time_nospace(const char *cp, time_t *t);
int parse_http_time(const char *buf, struct tm *tm);
int format_time_interval(char *out, size_t out_len, long interval);
-/* Cached time */
-#ifdef TIME_IS_FAST
-#define approx_time() time(NULL)
-#define update_approx_time(t) STMT_NIL
-#else
-time_t approx_time(void);
-void update_approx_time(time_t now);
-#endif /* defined(TIME_IS_FAST) */
-
/* Rate-limiter */
/** A ratelim_t remembers how often an event is occurring, and how often