X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/22e6546d2c6f14864cc93c4ed1470d8e8c1e2d95..82230d737404aa70c3c2b5824d97109f1f129d58:/src/xbt/xbt_log_layout_format.c diff --git a/src/xbt/xbt_log_layout_format.c b/src/xbt/xbt_log_layout_format.c index ea33369b7a..d0d2bf9859 100644 --- a/src/xbt/xbt_log_layout_format.c +++ b/src/xbt/xbt_log_layout_format.c @@ -6,15 +6,13 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/host.h" +#include "simgrid/msg.h" /* MSG_get_clock */ #include "src/xbt/log_private.h" -#include "surf/surf.h" #include "xbt/sysdep.h" #include extern const char *xbt_log_priority_names[8]; -static double format_begin_of_time = -1; - #define ERRMSG \ "Unknown %%%c sequence in layout format (%s).\n" \ "Known sequences:\n" \ @@ -145,10 +143,10 @@ static int xbt_log_layout_format_doit(xbt_log_layout_t l, xbt_log_event_t ev, co show_string(ev->functionName); break; case 'd': /* date; LOG4J compliant */ - show_double(surf_get_clock()); + show_double(MSG_get_clock()); break; case 'r': /* application age; LOG4J compliant */ - show_double(surf_get_clock() - format_begin_of_time); + show_double(MSG_get_clock()); break; case 'm': { /* user-provided message; LOG4J compliant */ int sz; @@ -188,8 +186,5 @@ xbt_log_layout_t xbt_log_layout_format_new(char *arg) res->free_ = &xbt_log_layout_format_free; res->data = xbt_strdup((char *) arg); - if (format_begin_of_time < 0) - format_begin_of_time = surf_get_clock(); - return res; }