From: Martin Quinson Date: Thu, 13 Jun 2019 21:53:43 +0000 (+0200) Subject: tiny doc improvements X-Git-Tag: v3.23~41 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/44b8518ac68b33992f7584d68fcab676e8e952ef tiny doc improvements --- diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index ebbc9c6f72..cee9499564 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -311,10 +311,10 @@ namespace this_actor { XBT_PUBLIC bool is_maestro(); -/** Block the current actor sleeping for that amount of seconds (may throw hostFailure) */ +/** Block the current actor sleeping for that amount of seconds */ XBT_PUBLIC void sleep_for(double duration); -/** Block the current actor sleeping until the specified timestamp (may throw hostFailure) */ -XBT_PUBLIC void sleep_until(double timeout); +/** Block the current actor sleeping until the specified timestamp */ +XBT_PUBLIC void sleep_until(double wakeup_time); template inline void sleep_for(std::chrono::duration duration) { diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index fe048a57b7..7a66c4be67 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -289,11 +289,11 @@ void yield() simix::simcall([] { /* do nothing*/ }); } -XBT_PUBLIC void sleep_until(double timeout) +XBT_PUBLIC void sleep_until(double wakeup_time) { double now = SIMIX_get_clock(); - if (timeout > now) - sleep_for(timeout - now); + if (wakeup_time > now) + sleep_for(wakeup_time - now); } void execute(double flops)