From c9e79e55c301224966d978613c01e20d30171ae4 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 19 Jan 2011 17:43:07 +0000 Subject: [PATCH] candump: Avoid ragged output of timestamp values when printing differential timestamps (commandline option -td). Idea & original patch by Uwe Bonnes. Signed-off-by: Oliver Hartkopp --- candump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/candump.c b/candump.c index 0581a3d..888c0fb 100644 --- a/candump.c +++ b/candump.c @@ -716,7 +716,7 @@ int main(int argc, char **argv) diff.tv_sec--, diff.tv_usec += 1000000; if (diff.tv_sec < 0) diff.tv_sec = diff.tv_usec = 0; - printf("(%ld.%06ld) ", diff.tv_sec, diff.tv_usec); + printf("(%03ld.%06ld) ", diff.tv_sec, diff.tv_usec); if (timestamp == 'd') last_tv = tv; /* update for delta calculation */ -- 2.7.4