X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b73466ada27682d1729f394549479da83ef4a99..b4b78f6684f68475ec9c7b63af21f733ff04a435:/contrib/benchmarking_code_block/bench.h diff --git a/contrib/benchmarking_code_block/bench.h b/contrib/benchmarking_code_block/bench.h index fc86bc3db0..568a931168 100644 --- a/contrib/benchmarking_code_block/bench.h +++ b/contrib/benchmarking_code_block/bench.h @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. 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. */ + /* Copy to src/include/xbt/ folder */ /* Benchmarking a code block */ @@ -91,7 +97,7 @@ static inline int bench_end_block(char* block_id) clock_gettime(CLOCK_REALTIME, &mybench->end_time); struct timespec interval; xbt_diff_time(&mybench->start_time, &mybench->end_time, &interval); - fprintf(mybench->output, "%s %lf %lf %lf\n", block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); + fprintf(mybench->output, "%s %f %f %f\n", block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); return 0; } } @@ -127,7 +133,7 @@ static inline int xbt_bench_end(char* block_id) if(mybench->block_id == NULL) strcat (mybench->block_id, "NONAME"); - fprintf(mybench->output, "%s %lf %lf %lf\n", mybench->block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); + fprintf(mybench->output, "%s %f %f %f\n", mybench->block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); return 0; }