X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dccf1b41e9c7b5a696f01abceaa2779fe65f154f..29d98d1ceb682fbc4c734a92353be4b0bcd5d17b:/teshsuite/simdag/evaluate-get-route-time/evaluate-get-route-time.c diff --git a/teshsuite/simdag/evaluate-get-route-time/evaluate-get-route-time.c b/teshsuite/simdag/evaluate-get-route-time/evaluate-get-route-time.c index bb81c1c40b..7dd4dd6469 100644 --- a/teshsuite/simdag/evaluate-get-route-time/evaluate-get-route-time.c +++ b/teshsuite/simdag/evaluate-get-route-time/evaluate-get-route-time.c @@ -15,7 +15,8 @@ int main(int argc, char **argv) { - int i, j; + int i; + int j; xbt_os_timer_t timer = xbt_os_timer_new(); SD_init(&argc, argv); @@ -35,15 +36,17 @@ int main(int argc, char **argv) sg_host_t h1 = hosts[i]; sg_host_t h2 = hosts[j]; printf("%d\tand\t%d\t\t",i,j); + xbt_dynar_t route = xbt_dynar_new(sizeof(SD_link_t), NULL); xbt_os_cputimer_start(timer); - SD_route_get_list(h1, h2); + sg_host_route(h1, h2, route); xbt_os_cputimer_stop(timer); + xbt_dynar_free(&route); + printf("%f\n", xbt_os_timer_elapsed(timer) ); xbt_free(hosts); - SD_exit(); return 0; }