- duration = MAX(duration, sg_surf_precision);
-
- XBT_IN("(%s,%g)", cname(), duration);
- CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(model()), 1.0, isOff(), this);
-
- action->maxDuration_ = duration;
- action->suspended_ = 2;
- if (duration == NO_MAX_DURATION) {
- /* Move to the *end* of the corresponding action set. This convention
- is used to speed up update_resource_state */
- action->getStateSet()->erase(action->getStateSet()->iterator_to(*action));
- action->stateSet_ = static_cast<CpuTiModel*>(model())->runningActionSetThatDoesNotNeedBeingChecked_;
- action->getStateSet()->push_back(*action);
- }