Commit c0190083 authored by Maria Matejka's avatar Maria Matejka
Browse files

IO loop duration fixup

parent aca4c3fc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −2
Original line number Diff line number Diff line
@@ -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)
  {