]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/resource/Model.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
32 bits insists of having some timestamps off by 1us ... Hide them.
[simgrid.git] / src / kernel / resource / Model.cpp
index c03ea5048192f8939230f4d7f154b60fedda414c..1e8998c727270a51480ee38d34972ee66ba8fa11 100644 (file)
@@ -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();