Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use ssize_t for Exec::wait_any and Io::wait_any too.
[simgrid.git] / examples / cpp / exec-dependent / s4u-exec-dependent.cpp
index b8eb8b5..0fa1eb9 100644 (file)
@@ -41,7 +41,7 @@ static void worker()
 
   // wait for the completion of all activities
   while (not pending_execs.empty()) {
-    int changed_pos = simgrid::s4u::Exec::wait_any_for(&pending_execs, -1);
+    ssize_t changed_pos = simgrid::s4u::Exec::wait_any_for(pending_execs, -1);
     XBT_INFO("Exec '%s' is complete", pending_execs[changed_pos]->get_cname());
     pending_execs.erase(pending_execs.begin() + changed_pos);
   }
@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.get_clock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }