namespace activity {
class XBT_PUBLIC SleepImpl : public ActivityImpl {
- ~SleepImpl() override;
+ sg_host_t host_ = nullptr;
+ double duration_ = 0;
public:
- explicit SleepImpl(std::string name, s4u::Host* host) : ActivityImpl(std::move(name)), host_(host) {}
+ SleepImplPtr set_name(const std::string& name);
+ SleepImplPtr set_host(s4u::Host* host);
+ SleepImplPtr set_duration(double duration);
void post() override;
- SleepImpl* start(double duration);
-
- sg_host_t host_ = nullptr;
+ void finish() override;
+ SleepImpl* start();
};
-}
-}
-} // namespace simgrid::kernel::activity
+} // namespace activity
+} // namespace kernel
+} // namespace simgrid
#endif