From eeefd61433ce5d0491b42e9e94303d6126bcb19c Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Fri, 27 May 2016 17:26:29 +0200 Subject: [PATCH] let's print nanosecond in times of textlog instead of closest millisecond --- common/utils/T/tracer/logger/textlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/utils/T/tracer/logger/textlog.c b/common/utils/T/tracer/logger/textlog.c index ea7f9c8a93..a9503b9510 100644 --- a/common/utils/T/tracer/logger/textlog.c +++ b/common/utils/T/tracer/logger/textlog.c @@ -47,8 +47,8 @@ static void _event(void *p, event e) #ifdef T_SEND_TIME t = localtime(&e.sending_time.tv_sec); /* round tv_nsec to nearest millisecond */ - sprintf(tt, "%2.2d:%2.2d:%2.2d.%3.3d: ", t->tm_hour, t->tm_min, t->tm_sec, - (int)((e.sending_time.tv_nsec/(1000000/2)+1)/2)); + sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld: ", t->tm_hour, t->tm_min, t->tm_sec, + e.sending_time.tv_nsec); PUTS(&l->o, tt); #endif -- GitLab