Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill src/include
[simgrid.git] / src / kernel / resource / Action.cpp
index 757531a..9651cde 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -7,14 +7,12 @@
 #include "simgrid/kernel/resource/Model.hpp"
 #include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/lmm/maxmin.hpp"
-#include "src/surf/surf_interface.hpp"
+#include "src/simgrid/math_utils.h"
 
 XBT_LOG_NEW_CATEGORY(kernel, "SimGrid internals");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_resource, kernel, "Resources, modeling the platform performance");
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 Action::Action(Model* model, double cost, bool failed) : Action(model, cost, failed, nullptr) {}
 
@@ -196,12 +194,12 @@ double Action::get_remains()
 void Action::update_max_duration(double delta)
 {
   if (max_duration_ != NO_MAX_DURATION)
-    double_update(&max_duration_, delta, sg_surf_precision);
+    double_update(&max_duration_, delta, sg_precision_timing);
 }
 
 void Action::update_remains(double delta)
 {
-  double_update(&remains_, delta, sg_maxmin_precision * sg_surf_precision);
+  double_update(&remains_, delta, sg_precision_workamount * sg_precision_timing);
 }
 
 void Action::set_last_update()
@@ -247,6 +245,4 @@ Action* ActionHeap::pop()
   return action;
 }
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource