X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fd7f6b8ed24809565026336235edcd4eedea1465..9c94047a774737b8f5384262706c265670a28a00:/src/surf/cpu.c diff --git a/src/surf/cpu.c b/src/surf/cpu.c index 612030cca8..64c1508601 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -304,11 +304,13 @@ static surf_action_t execute(void *cpu, double size) static surf_action_t action_sleep(void *cpu, double duration) { surf_action_cpu_Cas01_t action = NULL; - + if (duration>0) + duration=MAX(duration,MAXMIN_PRECISION); XBT_IN2("(%s,%g)", ((cpu_Cas01_t) cpu)->name, duration); action = (surf_action_cpu_Cas01_t) execute(cpu, 1.0); action->generic_action.max_duration = duration; action->suspended = 2; + lmm_update_variable_weight(cpu_maxmin_system, action->variable, 0.0); XBT_OUT; return (surf_action_t) action;