X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6713c5277547eab779ccbac88e16fb15ab0b39f9..ea6c1e33aa83826778637849d951a9eccabf3d67:/src/surf/cpu.c diff --git a/src/surf/cpu.c b/src/surf/cpu.c index 612030cca8..3ba5717a39 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -304,11 +304,12 @@ 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; - + 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;