- smx_host_t host;
- smx_action_t action;
-
- smpi_bench_end();
-
- host = SIMIX_host_self();
-
- SIMIX_mutex_lock(smpi_global->execute_mutex);
-
- action = SIMIX_action_sleep(host, seconds);
-
- SIMIX_register_action_to_condition(action, smpi_global->execute_cond);
- SIMIX_cond_wait(smpi_global->execute_cond, smpi_global->execute_mutex);
- SIMIX_unregister_action_to_condition(action, smpi_global->execute_cond);
- SIMIX_action_destroy(action);
-
- SIMIX_mutex_unlock(smpi_global->execute_mutex);
-
- smpi_bench_begin();
- return 0;
+ smx_host_t host;
+ smx_action_t action;
+
+ smpi_bench_end();
+ host = SIMIX_host_self();
+ action = SIMIX_req_action_sleep(host, (double)seconds);
+ smpi_process_wait_action(action);
+ SIMIX_req_action_destroy(action);
+ smpi_bench_begin();
+ return 0;