X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/040d8fa855d2b6ac9884f68108a09b935570be21..261e680f278e36ba4efbc0755fb08d00ff3cad83:/src/plugins/link_energy.cpp diff --git a/src/plugins/link_energy.cpp b/src/plugins/link_energy.cpp index 23f6de0c39..51bd89c211 100644 --- a/src/plugins/link_energy.cpp +++ b/src/plugins/link_energy.cpp @@ -41,8 +41,7 @@ SIMGRID_REGISTER_PLUGIN(link_energy, "Link energy consumption.", &sg_link_energy XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy, kernel, "Logging specific to the LinkEnergy plugin"); -namespace simgrid { -namespace plugin { +namespace simgrid::plugin { class LinkEnergy { s4u::Link* link_{}; @@ -138,11 +137,10 @@ double LinkEnergy::get_power() const double LinkEnergy::get_consumed_energy() { if (last_updated_ < simgrid::s4u::Engine::get_clock()) // We need to simcall this as it modifies the environment - kernel::actor::simcall(std::bind(&LinkEnergy::update, this)); + kernel::actor::simcall_answered(std::bind(&LinkEnergy::update, this)); return this->total_energy_; } -} // namespace plugin -} // namespace simgrid +} // namespace simgrid::plugin using simgrid::plugin::LinkEnergy;