Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
small simplifications around simcalls
[simgrid.git] / src / kernel / activity / SleepImpl.hpp
index 9128912..ec5c9e2 100644 (file)
@@ -13,16 +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;
+  void finish() override;
+  SleepImpl* start();
 };
-}
-}
-} // namespace simgrid::kernel::activity
+} // namespace activity
+} // namespace kernel
+} // namespace simgrid
 
 #endif