X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ec2d068ad2f30860ebe569929609888acb662117..deaf4c6f1cb3026b053ca861fe77313c78385be7:/src/kernel/resource/Action.cpp diff --git a/src/kernel/resource/Action.cpp b/src/kernel/resource/Action.cpp index 04840601ae..8559cca8db 100644 --- a/src/kernel/resource/Action.cpp +++ b/src/kernel/resource/Action.cpp @@ -6,6 +6,7 @@ #include "simgrid/kernel/resource/Action.hpp" #include "simgrid/kernel/resource/Model.hpp" #include "src/kernel/lmm/maxmin.hpp" +#include "src/surf/surf_interface.hpp" XBT_LOG_NEW_CATEGORY(kernel, "Logging specific to the internals of SimGrid"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(resource, kernel, "Logging specific to the resources"); @@ -227,6 +228,20 @@ double Action::getRemains() return remains_; } +void Action::updateMaxDuration(double delta) +{ + double_update(&maxDuration_, delta, sg_surf_precision); +} +void Action::updateRemains(double delta) +{ + double_update(&remains_, delta, sg_maxmin_precision * sg_surf_precision); +} + +void Action::refreshLastUpdate() +{ + lastUpdate_ = surf_get_clock(); +} + } // namespace surf } // namespace simgrid } // namespace simgrid