Skip to content
Snippets Groups Projects
Commit eeefd614 authored by Cedric Roux's avatar Cedric Roux
Browse files

let's print nanosecond in times of textlog instead of closest millisecond

parent 32302fc2
Branches
Tags
No related merge requests found
...@@ -47,8 +47,8 @@ static void _event(void *p, event e) ...@@ -47,8 +47,8 @@ static void _event(void *p, event e)
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
t = localtime(&e.sending_time.tv_sec); t = localtime(&e.sending_time.tv_sec);
/* round tv_nsec to nearest millisecond */ /* 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, sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld: ", t->tm_hour, t->tm_min, t->tm_sec,
(int)((e.sending_time.tv_nsec/(1000000/2)+1)/2)); e.sending_time.tv_nsec);
PUTS(&l->o, tt); PUTS(&l->o, tt);
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment