]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/SleepImpl.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify
[simgrid.git] / src / kernel / activity / SleepImpl.hpp
index dbc0a7d4ab17b3caf2e8e9802910c19390eb5f3f..ec5c9e271f0a004c42111a0ec3590e2e62a7befc 100644 (file)
@@ -13,17 +13,19 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-class XBT_PUBLIC SleepImpl : public ActivityImpl {
+class XBT_PUBLIC SleepImpl : public ActivityImpl_T<SleepImpl> {
+  sg_host_t host_  = nullptr;
+  double duration_ = 0;
+
 public:
-  void suspend() override;
-  void resume() override;
+  SleepImpl& set_host(s4u::Host* host);
+  SleepImpl& set_duration(double duration);
   void post() override;
-
-  sg_host_t host           = nullptr; /* The host that is sleeping */
-  simgrid::kernel::resource::Action* surf_sleep = nullptr; /* The Surf sleeping action encapsulated */
+  void finish() override;
+  SleepImpl* start();
 };
-}
-}
-} // namespace simgrid::kernel::activity
+} // namespace activity
+} // namespace kernel
+} // namespace simgrid
 
 #endif