From: Gabriel Corona Date: Thu, 13 Nov 2014 12:10:59 +0000 (+0100) Subject: Don't use xbt_os_time() when not needed X-Git-Tag: v3_12~732^2~213 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d4f623318c510c8cf981958cfc317984181572a1?ds=sidebyside Don't use xbt_os_time() when not needed --- diff --git a/src/simix/smx_environment.c b/src/simix/smx_environment.c index 7317c366c8..8f8e7d4038 100644 --- a/src/simix/smx_environment.c +++ b/src/simix/smx_environment.c @@ -34,10 +34,11 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix, void SIMIX_create_environment(const char *file) { double start, end; - - start = xbt_os_time(); + if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug)) + start = xbt_os_time(); parse_platform_file(file); - end = xbt_os_time(); + if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug)) + end = xbt_os_time(); XBT_DEBUG("PARSE TIME: %g", (end - start)); }