Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add sg_actor_sleep_until
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 10 Feb 2020 15:58:26 +0000 (16:58 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 10 Feb 2020 16:22:03 +0000 (17:22 +0100)
include/simgrid/actor.h
src/s4u/s4u_Actor.cpp

index 384b91e..9145a7a 100644 (file)
@@ -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();
index ac4af83..cac08ca 100644 (file)
@@ -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");