Commit 1ebcd1ed authored by Robert Schmidt's avatar Robert Schmidt

Print LOG time as uptime

parent a54323bc
......@@ -533,10 +533,7 @@ static inline int log_header(log_component_t *c,
if ( flag & FLAG_TIME ) {
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
static double tOrigin=0;
if (tOrigin==0)
tOrigin=t.tv_sec+t.tv_nsec/1.0e9;
snprintf(timeString, sizeof t,"%05.3f",t.tv_sec+t.tv_nsec/1.0e9-tOrigin);
snprintf(timeString, sizeof t,"%05.3f",t.tv_sec+t.tv_nsec/1.0e9);
} else {
timeString[0]=0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment