Use the new solver to compute time
Now that all the infrastructure exists, hook it up. Track which nodes
are connected, if there are any orphaned nodes, and everything else the
old code used to do.
This doesn't yet handle single directions going and coming.
Change-Id: I658347797384f7608870d231a3ebbb2c05dad1dc
diff --git a/aos/events/event_scheduler.cc b/aos/events/event_scheduler.cc
index f5d6c92..49b170d 100644
--- a/aos/events/event_scheduler.cc
+++ b/aos/events/event_scheduler.cc
@@ -44,13 +44,12 @@
void EventScheduler::CallOldestEvent() {
CHECK_GT(events_list_.size(), 0u);
auto iter = events_list_.begin();
- monotonic_now_ = iter->first;
- monotonic_now_valid_ = true;
+ CHECK_EQ(monotonic_now(), iter->first)
+ << ": Time is wrong on node " << node_index_;
::std::function<void()> callback = ::std::move(iter->second);
events_list_.erase(iter);
callback();
- monotonic_now_valid_ = false;
}
void EventScheduler::RunOnRun() {
@@ -158,6 +157,10 @@
}
}
+ if (min_scheduler) {
+ VLOG(1) << "Oldest event " << min_event_time << " on scheduler "
+ << min_scheduler->node_index_;
+ }
return std::make_tuple(min_event_time, min_scheduler);
}