]> AND Private Git Repository - loba.git/blobdiff - process.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add option "-t" for fixing a time limit on the simulation.
[loba.git] / process.cpp
index 34590f3f199f33be126f8111f4539b8caaf522bb..99bd0399e308d0281fb7c31074635aab069ec129 100644 (file)
@@ -110,6 +110,10 @@ int process::run()
             break;
         if (opt::lb_maxiter && lb_iter >= opt::lb_maxiter)
             break;
+        if (opt::time_limit && MSG_get_clock() >= opt::time_limit) {
+            VERB2("Reached time limit: %g/%g", MSG_get_clock(), opt::time_limit);
+            break;
+        }
 
         // block on receiving unless there is something to compute or
         // to send