diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-01-17 22:48:33 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-01-23 18:26:32 +0100 |
| commit | 3dad49ca9499dcb917691e10ebc1685dda74cf72 (patch) | |
| tree | f2312167f1f62eefde256cfdec4a8dcb3c4b0211 /lib/thread.c | |
| parent | 6ced0e7f10d850d51f21200f5d3243cc1b90c453 (diff) | |
lib: time: remove recent_time
This isn't even used anywhere.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/thread.c')
| -rw-r--r-- | lib/thread.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/thread.c b/lib/thread.c index 711dd3b730..518a69918d 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -41,8 +41,6 @@ DEFINE_MTYPE_STATIC(LIB, THREAD_STATS, "Thread stats") #include <mach/mach_time.h> #endif -/* Recent absolute time of day */ -struct timeval recent_time; /* Relative time, since startup */ static struct timeval relative_time; @@ -97,24 +95,6 @@ timeval_elapsed (struct timeval a, struct timeval b) + (a.tv_usec - b.tv_usec)); } -/* gettimeofday wrapper, to keep recent_time updated */ -static int -quagga_gettimeofday (struct timeval *tv) -{ - int ret; - - assert (tv); - - if (!(ret = gettimeofday (&recent_time, NULL))) - { - /* avoid copy if user passed recent_time pointer.. */ - if (tv != &recent_time) - *tv = recent_time; - return 0; - } - return ret; -} - static int quagga_get_relative (struct timeval *tv) { @@ -1418,14 +1398,6 @@ thread_getrusage (RUSAGE_T *r) quagga_get_relative (NULL); getrusage(RUSAGE_SELF, &(r->cpu)); r->real = relative_time; - -#ifdef HAVE_CLOCK_MONOTONIC - /* quagga_get_relative() only updates recent_time if gettimeofday - * based, not when using CLOCK_MONOTONIC. As we export recent_time - * and guarantee to update it before threads are run... - */ - quagga_gettimeofday(&recent_time); -#endif /* HAVE_CLOCK_MONOTONIC */ } struct thread *thread_current = NULL; |
