From 3b6ce80f7e3f2197b1e53175af7f5f0a2d2b86e0 Mon Sep 17 00:00:00 2001 From: gardners Date: Tue, 10 Jan 2012 14:11:54 +1030 Subject: [PATCH] Fixed cpu eating bug due to time calculation based on wrong epoch. --- overlay_interface.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/overlay_interface.c b/overlay_interface.c index ce5cb69e..7dec7477 100644 --- a/overlay_interface.c +++ b/overlay_interface.c @@ -710,11 +710,7 @@ long long overlay_time_until_next_tick() { /* By default only tick once per day */ long long nexttick=86400*1000; - long long now; - struct timeval tv; - - gettimeofday(&tv,NULL); - now=tv.tv_sec*1000LL+tv.tv_usec/1000; + long long now=overlay_gettime_ms(); int i; if (debug&DEBUG_VERBOSE_IO)fprintf(stderr,"Tick-check on %d interfaces at %lldms\n",overlay_interface_count,now);