X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f23b0fb864cb60978c1fcfd48d50f62dd054fe31..b04cecc8333d7fd50cd510fad5c615daafeaad3d:/examples/s4u/cloud-capping/s4u-cloud-capping.cpp diff --git a/examples/s4u/cloud-capping/s4u-cloud-capping.cpp b/examples/s4u/cloud-capping/s4u-cloud-capping.cpp index fbdef2a05e..69f3323aa7 100644 --- a/examples/s4u/cloud-capping/s4u-cloud-capping.cpp +++ b/examples/s4u/cloud-capping/s4u-cloud-capping.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -32,11 +32,10 @@ static void worker(double computation_amount, bool use_bound, double bound) XBT_INFO("not bound => duration %f (%f flops/s)", duration, flops_per_sec); } -#define DOUBLE_MAX 1e11 static void worker_busy_loop(const char* name, double speed) { - simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_async(DOUBLE_MAX); - double exec_remain_prev = DOUBLE_MAX; + double exec_remain_prev = 1e11; + simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_async(exec_remain_prev); for (int i = 0; i < 10; i++) { if (speed > 0) { double new_bound = (speed / 10) * i;