From: adfaure Date: Wed, 7 Sep 2016 15:23:54 +0000 (+0200) Subject: [s4u]fix s4u::Comm::wait_any_for bugs when the timeout is below the current clock X-Git-Tag: v3_14~419^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/06f44c701c3dabd372daa4933af9e4d16794d149 [s4u]fix s4u::Comm::wait_any_for bugs when the timeout is below the current clock --- diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index e25d531619..0edf57d08f 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -497,7 +497,7 @@ void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t synchros, d if (timeout < 0.0){ simcall->timer = NULL; } else { - simcall->timer = SIMIX_timer_set(timeout, [simcall]() { + simcall->timer = SIMIX_timer_set(SIMIX_get_clock() + timeout, [simcall]() { SIMIX_waitany_remove_simcall_from_actions(simcall); simcall_comm_waitany__set__result(simcall, -1); SIMIX_simcall_answer(simcall);