X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cbe87b244923c8b51301ee28be8a28ca0dd729be..9184de69711560f747a3fbbb153a371375f2c38e:/src/kernel/resource/Model.cpp diff --git a/src/kernel/resource/Model.cpp b/src/kernel/resource/Model.cpp index c03ea50481..1e8998c727 100644 --- a/src/kernel/resource/Model.cpp +++ b/src/kernel/resource/Model.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2019. 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. */ @@ -73,7 +73,7 @@ double Model::next_occuring_event_lazy(double now) min = now + time_to_completion; // when the task will complete if nothing changes } - if ((action->get_max_duration() > NO_MAX_DURATION) && + if ((action->get_max_duration() != NO_MAX_DURATION) && (min <= -1 || action->get_start_time() + action->get_max_duration() < min)) { // when the task will complete anyway because of the deadline if any min = action->get_start_time() + action->get_max_duration();