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