mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
Fixed cpu eating bug due to time calculation based on wrong epoch.
This commit is contained in:
parent
9156a68c7f
commit
3b6ce80f7e
@ -710,11 +710,7 @@ long long overlay_time_until_next_tick()
|
|||||||
{
|
{
|
||||||
/* By default only tick once per day */
|
/* By default only tick once per day */
|
||||||
long long nexttick=86400*1000;
|
long long nexttick=86400*1000;
|
||||||
long long now;
|
long long now=overlay_gettime_ms();
|
||||||
struct timeval tv;
|
|
||||||
|
|
||||||
gettimeofday(&tv,NULL);
|
|
||||||
now=tv.tv_sec*1000LL+tv.tv_usec/1000;
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
if (debug&DEBUG_VERBOSE_IO)fprintf(stderr,"Tick-check on %d interfaces at %lldms\n",overlay_interface_count,now);
|
if (debug&DEBUG_VERBOSE_IO)fprintf(stderr,"Tick-check on %d interfaces at %lldms\n",overlay_interface_count,now);
|
||||||
|
Loading…
Reference in New Issue
Block a user