Fixed cpu eating bug due to time calculation based on wrong epoch.

This commit is contained in:
gardners 2012-01-10 14:11:54 +10:30
parent 9156a68c7f
commit 3b6ce80f7e

View File

@ -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);