]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed nanoseconds in IO loop time limiter
authorMaria Matejka <mq@ucw.cz>
Fri, 7 Jun 2024 07:05:11 +0000 (09:05 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Jun 2024 07:23:50 +0000 (09:23 +0200)
sysdep/unix/io-loop.c

index aa73865e3fc1a9d73c4fae47fba2906766e95914..2e075827451b89dc3cf6e9e48b71607a6b6480d5 100644 (file)
@@ -819,8 +819,8 @@ bird_thread_main(void *arg)
     if (thr->loop_count > 0)
     {
       thr->max_loop_time_ns = (thr->max_latency_ns / 2 - (thr_before_run - thr_loop_start)) / (u64) thr->loop_count;
-      if (thr->max_loop_time_ns > 300 MS)
-       thr->max_loop_time_ns = 300 MS;
+      if (thr->max_loop_time_ns NS > 300 MS)
+       thr->max_loop_time_ns = 300 MS TO_NS;
     }
 
     /* Run all scheduled loops */