Commit 4cc6e637 authored by SIMONIN Matthieu's avatar SIMONIN Matthieu
Browse files

align with the new s4u API

parent 88364adb
Pipeline #224470 passed with stages
in 25 minutes and 10 seconds
#include "VmsInterface.hpp"
#include "simgrid/s4u.hpp"
#include <limits.h>
#include <simgrid/kernel/resource/Model.hpp>
XBT_LOG_NEW_DEFAULT_CATEGORY(vm_coordinator, "Logging specific to the VmsCoordinator");
......@@ -44,9 +43,10 @@ static double compute_min_latency()
static double get_next_event()
{
simgrid::s4u::Engine* engine = simgrid::s4u::Engine::get_instance();
double time = simgrid::s4u::Engine::get_clock();
double next_event_time = std::numeric_limits<double>::infinity();
for (simgrid::kernel::resource::Model* model : all_existing_models) {
for (auto model : engine->get_model_list(simgrid::kernel::resource::Model::Type::NETWORK)) {
double model_event = time + model->next_occurring_event(time);
if (model_event < next_event_time && model_event > time) {
next_event_time = model_event;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment