+SleepImpl* SleepImpl::start()
+{
+ surf_action_ = host_->pimpl_cpu->sleep(duration_);
+ surf_action_->set_activity(this);
+ XBT_DEBUG("Create sleep synchronization %p", this);
+ return this;
+}
+
+void SleepImpl::post()
+{
+ if (surf_action_->get_state() == resource::Action::State::FAILED) {
+ if (host_ && not host_->is_on())
+ state_ = SIMIX_SRC_HOST_FAILURE;
+ else
+ state_ = SIMIX_CANCELED;
+ } else if (surf_action_->get_state() == resource::Action::State::FINISHED) {
+ state_ = SIMIX_DONE;
+ }
+ finish();
+}
+
+void SleepImpl::finish()