- ActionList *runningActions = getRunningActionSet();
- double min = shareResourcesMaxMin(runningActions, maxminSystem_, bottleneck_solve);
-
- for (auto it(runningActions->begin()), itend(runningActions->end()); it != itend ; ++it) {
- L07Action *action = static_cast<L07Action*>(&*it);
- if (action->m_latency > 0 && (min < 0 || action->m_latency < min)) {
- min = action->m_latency;
- XBT_DEBUG("Updating min with %p (start %f): %f", action, action->getStartTime(), min);
+ double min = HostModel::nextOccuringEventFull(now);
+ for (Action const& action : *getRunningActionSet()) {
+ const L07Action& net_action = static_cast<const L07Action&>(action);
+ if (net_action.latency_ > 0 && (min < 0 || net_action.latency_ < min)) {
+ min = net_action.latency_;
+ XBT_DEBUG("Updating min with %p (start %f): %f", &net_action, net_action.getStartTime(), min);