From 123eb94b4e6a8db258c498d38ac1b21656f0f840 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christophe=20Thi=C3=A9ry?= Date: Tue, 29 Nov 2011 13:57:42 +0100 Subject: [PATCH 1/1] The latency is constant with the constant network model. --- src/surf/network_constant.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/surf/network_constant.c b/src/surf/network_constant.c index 4d2fd380e3..75f0634cea 100644 --- a/src/surf/network_constant.c +++ b/src/surf/network_constant.c @@ -52,21 +52,10 @@ static void netcste_action_cancel(surf_action_t action) static double netcste_share_resources(double now) { - surf_action_network_Constant_t action = NULL; - xbt_swag_t running_actions = - surf_network_model->states.running_action_set; - double min = -1.0; - - xbt_swag_foreach(action, running_actions) { - if (action->latency > 0) { - if (min < 0) - min = action->latency; - else if (action->latency < min) - min = action->latency; - } + if (!xbt_swag_size(surf_network_model->states.running_action_set)) { + return -1.0; } - - return min; + return sg_latency_factor; } static void netcste_update_actions_state(double now, double delta) -- 2.20.1