From ea6c1e33aa83826778637849d951a9eccabf3d67 Mon Sep 17 00:00:00 2001 From: mquinson Date: Mon, 19 May 2008 12:42:01 +0000 Subject: [PATCH] do not wait for too small durations to avoid numerical instabilities git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5438 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1