X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2cdb13351fe9ef4d8b550c66cbbb5d70d7d9f30c..27e5a1eebe0cc33508692e868ae7b369f4a482b4:/src/surf/network_cm02.cpp diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 3deb80ea8c..f590295df9 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -424,7 +424,6 @@ void NetworkCm02Action::update_remains_lazy(double now) return; double delta = now - get_last_update(); - double max_duration = get_max_duration(); if (get_remains_no_update() > 0) { XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, get_remains_no_update(), @@ -434,13 +433,10 @@ void NetworkCm02Action::update_remains_lazy(double now) XBT_DEBUG("Updating action(%p): remains is now %f", this, get_remains_no_update()); } - if (max_duration > NO_MAX_DURATION) { - double_update(&max_duration, delta, sg_surf_precision); - set_max_duration(max_duration); - } + update_max_duration(delta); if ((get_remains_no_update() <= 0 && (get_variable()->get_weight() > 0)) || - ((max_duration > NO_MAX_DURATION) && (max_duration <= 0))) { + ((get_max_duration() != NO_MAX_DURATION) && (get_max_duration() <= 0))) { finish(Action::State::FINISHED); get_model()->get_action_heap().remove(this); }