Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Now is still not in the past.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 20 Oct 2020 09:51:29 +0000 (11:51 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 20 Oct 2020 09:52:14 +0000 (11:52 +0200)
Fix simgrid/simgrid#52

ChangeLog
src/surf/surf_c_bindings.cpp

index e5d1e1d..1db8e3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,7 @@ Fixed bugs (FG#.. -> FramaGit bugs; FG!.. -> FG merge requests)
  - FG#43: xbt::random needs some care
  - FG#48: The Impossible Did Happen (yet again)
  - FG#50: Suspending an actor executed at the current timestamp fails
+ - FG#52: Zero-seconds timeout : "That's in the past already"
  - FG#54: How to suspend a comm?
  - FG!24: Documentation and fix for xbt/random
  - FG!35: Add a modeling hint for parallel links in doc
index 10d2874..e76e309 100644 (file)
@@ -50,8 +50,8 @@ double surf_solve(double max_date)
   simgrid::kernel::resource::Resource* resource = nullptr;
   simgrid::kernel::profile::Event* event        = nullptr;
 
-  if (max_date > 0.0) {
-    xbt_assert(max_date > NOW,"You asked to simulate up to %f, but that's in the past already", max_date);
+  if (max_date != -1.0) {
+    xbt_assert(max_date >= NOW, "You asked to simulate up to %f, but that's in the past already", max_date);
 
     time_delta = max_date - NOW;
   }