From a9169866b4d15ec5783a28f90db81cf37fe255bf Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 23 Jun 2005 14:40:39 +0000 Subject: [PATCH] In RL, count the time from the begining of the application, not from the 1 jan 1970, so that details appear more clearly git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1380 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/log_default_appender.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xbt/log_default_appender.c b/src/xbt/log_default_appender.c index cdf659ca09..7aeb17023e 100644 --- a/src/xbt/log_default_appender.c +++ b/src/xbt/log_default_appender.c @@ -38,10 +38,14 @@ xbt_log_appender_t xbt_log_default_appender = &xbt_log_appender_file; static const char* xbt_logappender_verbose_information(void) { static char buffer[256]; + static double begin_of_time = -1; + + if (begin_of_time<0) + begin_of_time=gras_os_time(); if(strlen(xbt_procname())) sprintf(buffer,"%s:%s:(%d) %g", gras_os_myname(), - xbt_procname(),gras_os_getpid(),gras_os_time()); + xbt_procname(),gras_os_getpid(),gras_os_time()-begin_of_time); else buffer[0]=0; -- 2.20.1