/*
* Time elapsed since the begining of the simulation.
*/
-double xbt_os_time() {
+double xbt_time() {
return SIMIX_get_clock();
}
/*
* Freeze the process for the specified amount of time
*/
-void xbt_os_sleep(double sec) {
+void xbt_sleep(double sec) {
smx_action_t act_sleep;
smx_process_t proc = SIMIX_process_self();
smx_mutex_t mutex;
/* create conditional and register action to it */
cond = SIMIX_cond_init();
- SIMIX_register_condition_to_action(act_sleep, cond);
SIMIX_register_action_to_condition(act_sleep, cond);
SIMIX_cond_wait(cond,mutex);
SIMIX_mutex_unlock(mutex);