- action->suspended_ = kernel::resource::Action::SuspendStates::sleeping;
- if (duration < 0) { // NO_MAX_DURATION
- /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
- simgrid::xbt::intrusive_erase(*action->get_state_set(), *action);
- action->state_set_ = &static_cast<CpuCas01Model*>(model())->cpuRunningActionSetThatDoesNotNeedBeingChecked_;
- action->get_state_set()->push_back(*action);
- }
+ action->set_suspend_state(Action::SuspendStates::SLEEPING);
+ if (duration == NO_MAX_DURATION)
+ action->set_state(Action::State::IGNORED);