A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
As Arnaud said, one function to rule them all
[simgrid.git]
/
src
/
xbt
/
xbt_sg_time.c
diff --git
a/src/xbt/xbt_sg_time.c
b/src/xbt/xbt_sg_time.c
index
b706ff1
..
8c820d9
100644
(file)
--- a/
src/xbt/xbt_sg_time.c
+++ b/
src/xbt/xbt_sg_time.c
@@
-12,14
+12,14
@@
/*
* Time elapsed since the begining of the simulation.
*/
/*
* 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
*/
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;
smx_action_t act_sleep;
smx_process_t proc = SIMIX_process_self();
smx_mutex_t mutex;
@@
-32,7
+32,6
@@
void xbt_os_sleep(double sec) {
/* create conditional and register action to it */
cond = SIMIX_cond_init();
/* 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);
SIMIX_register_action_to_condition(act_sleep, cond);
SIMIX_cond_wait(cond,mutex);
SIMIX_mutex_unlock(mutex);