From 44b8518ac68b33992f7584d68fcab676e8e952ef Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 13 Jun 2019 23:53:43 +0200 Subject: [PATCH] tiny doc improvements --- include/simgrid/s4u/Actor.hpp | 6 +++--- src/s4u/s4u_Actor.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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) -- 2.20.1