0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-18 19:35:20 +00:00

Fixed nanoseconds in IO loop time limiter

This commit is contained in:
Maria Matejka 2024-06-07 09:05:11 +02:00
parent 45cd4bbe9c
commit 67e9a37291

View 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 */