From: Frederic Suter Date: Mon, 10 Feb 2020 15:58:26 +0000 (+0100) Subject: add sg_actor_sleep_until X-Git-Tag: v3.26~980 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/749cf0c1157c66ccb0dda53d41b082994722d487?hp=4b6506b4a80e57be79144f54b778ebf29cbeae77 add sg_actor_sleep_until --- diff --git a/include/simgrid/actor.h b/include/simgrid/actor.h index 384b91e35b..9145a7af41 100644 --- a/include/simgrid/actor.h +++ b/include/simgrid/actor.h @@ -54,6 +54,7 @@ XBT_PUBLIC void sg_actor_kill_all(); XBT_PUBLIC void sg_actor_set_kill_time(sg_actor_t actor, double kill_time); XBT_PUBLIC void sg_actor_yield(); XBT_PUBLIC void sg_actor_sleep_for(double duration); +XBT_PUBLIC void sg_actor_sleep_until(double wakeup_time); XBT_PUBLIC sg_actor_t sg_actor_attach(const char* name, void* data, sg_host_t host, xbt_dict_t properties); XBT_PUBLIC void sg_actor_detach(); XBT_PUBLIC sg_actor_t sg_actor_self(); diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index ac4af83d99..cac08ca41c 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -675,6 +675,11 @@ void sg_actor_sleep_for(double duration) simgrid::s4u::this_actor::sleep_for(duration); } +void sg_actor_sleep_until(double wakeup_time) +{ + simgrid::s4u::this_actor::sleep_until(wakeup_time); +} + sg_actor_t sg_actor_attach(const char* name, void* data, sg_host_t host, xbt_dict_t properties) { xbt_assert(host != nullptr, "Invalid parameters: host and code params must not be nullptr");