+ /*verify if the action that ends is the correct. Call the wait_timeout with the new time. If the timeout occurs, an exception is raised */
+ while (1) {
+ time_elapsed = SIMIX_get_clock() - time;
+ SIMIX_cond_wait_timeout(task->simdata->cond, task->simdata->mutex,
+ max_duration-time_elapsed);
+ if ((task->simdata->comm != NULL) &&
+ (SIMIX_action_get_state(task->simdata->comm) != SURF_ACTION_RUNNING))
+ break;
+ }