+ /* Computes the next wakeup time for this mport. */
+ next_wake_time = MIN(bfd_wake_time(mport->bfd), cfm_wake_time(mport->cfm));
+ heap_change(&monitor_heap, heap_max(&monitor_heap),
+ MSEC_TO_PRIO(next_wake_time));
+ }
+
+ /* Waits on the earliest next wakeup time. */
+ if (!heap_is_empty(&monitor_heap)) {
+ poll_timer_wait_until(PRIO_TO_MSEC(heap_max(&monitor_heap)->priority));