X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/751886830e44e63850c118f0871b43ab1ffeb1d8..5b3677b425b9cc6949c1573d59ac772540cbf4b2:/examples/msg/chord/chord.c?ds=sidebyside diff --git a/examples/msg/chord/chord.c b/examples/msg/chord/chord.c index 2493447edc..8dafba417c 100644 --- a/examples/msg/chord/chord.c +++ b/examples/msg/chord/chord.c @@ -1,5 +1,4 @@ - -/* Copyright (c) 2010-2013. The SimGrid Team. +/* Copyright (c) 2010-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -38,6 +37,8 @@ static int periodic_fix_fingers_delay = 120; static int periodic_check_predecessor_delay = 120; static int periodic_lookup_delay = 10; +static const double sleep_delay = 4.9999; + extern long int smx_total_comms; /* @@ -364,7 +365,7 @@ int node(int argc, char *argv[]) random_lookup(&node); listen = 1; }else{ - MSG_process_sleep(5); + MSG_process_sleep(sleep_delay); if(!MC_visited_reduction()) no_op = 1; } @@ -383,7 +384,7 @@ int node(int argc, char *argv[]) next_lookup_date = MSG_get_clock() + periodic_lookup_delay; }else { // nothing to do: sleep for a while - MSG_process_sleep(5); + MSG_process_sleep(sleep_delay); } }