0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-18 17:18:42 +00:00

IO loop duration fixup

This commit is contained in:
Maria Matejka 2022-02-01 14:53:38 +01:00
parent aca4c3fc8e
commit c019008383
3 changed files with 4 additions and 4 deletions

View File

@ -55,6 +55,7 @@ static inline timer *timers_first(struct timeloop *loop)
#define current_time() atomic_load_explicit(&last_time, memory_order_acquire)
#define current_real_time() atomic_load_explicit(&real_time, memory_order_acquire)
#define current_time_update() ({ times_update(); current_time(); })
//#define now (current_time() TO_S)
//#define now_real (current_real_time() TO_S)

View File

@ -558,7 +558,7 @@ birdloop_main(void *arg)
if (loop->poll_changed)
sockets_prepare(loop);
btime duration = current_time() - loop_begin;
btime duration = current_time_update() - loop_begin;
if (duration > config->watchdog_warning)
log(L_WARN "I/O loop cycle took %d ms", (int) (duration TO_MS));
@ -578,7 +578,7 @@ birdloop_main(void *arg)
if (loop->stopped && !loop->links)
break;
loop_begin = current_time();
loop_begin = current_time_update();
if (rv)
sockets_fire(loop);

View File

@ -2100,8 +2100,7 @@ static btime loop_time;
static void
io_update_time(void)
{
times_update();
last_io_time = current_time();
last_io_time = current_time_update();
if (event_open)
{