Diff between 6e15bd3f806d81ef608ca847cd40534ccfb37755 and 3eeceee332e1fa319794c8c59cf5bc11ff51bf05

Changed Files

File Additions Deletions Status
tools/parser/parser.h +9 -7 modified

Full Patch

diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index 193c9f2..d807a94 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
@@ -114,13 +114,15 @@ static inline void p_indent(int level, struct frame *f)
 
 	if (!parser.state) {
 		if (parser.flags & DUMP_TSTAMP) {
-			struct tm tm;
-			time_t t = f->ts.tv_sec;
-			localtime_r(&t, &tm);
-			printf("%04d-%02d-%02d %02d:%02d:%02d.%06lu ", 
-				tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
-				tm.tm_hour, tm.tm_min, tm.tm_sec, f->ts.tv_usec);
-			//printf("%8lu.%06lu ", f->ts.tv_sec, f->ts.tv_usec);
+			if (parser.flags & DUMP_VERBOSE) {
+				struct tm tm;
+				time_t t = f->ts.tv_sec;
+				localtime_r(&t, &tm);
+				printf("%04d-%02d-%02d %02d:%02d:%02d.%06lu ", 
+					tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
+					tm.tm_hour, tm.tm_min, tm.tm_sec, f->ts.tv_usec);
+			} else
+				printf("%8lu.%06lu ", f->ts.tv_sec, f->ts.tv_usec);
 		}
 		printf("%c ", (f->in ? '>' : '<'));
 		parser.state = 1;