diff options
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/common/util.c b/src/common/util.c index 877368af59..358a68fd75 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1799,37 +1799,6 @@ format_time_interval(char *out, size_t out_len, long interval) } /* ===== - * Cached time - * ===== */ - -#ifndef TIME_IS_FAST -/** Cached estimate of the current time. Updated around once per second; - * may be a few seconds off if we are really busy. This is a hack to avoid - * calling time(NULL) (which not everybody has optimized) on critical paths. - */ -static time_t cached_approx_time = 0; - -/** Return a cached estimate of the current time from when - * update_approx_time() was last called. This is a hack to avoid calling - * time(NULL) on critical paths: please do not even think of calling it - * anywhere else. */ -time_t -approx_time(void) -{ - return cached_approx_time; -} - -/** Update the cached estimate of the current time. This function SHOULD be - * called once per second, and MUST be called before the first call to - * get_approx_time. */ -void -update_approx_time(time_t now) -{ - cached_approx_time = now; -} -#endif /* !defined(TIME_IS_FAST) */ - -/* ===== * Rate limiting * ===== */ |