From 21950012d0fd278ad24dc3dd3588499575c76cb3 Mon Sep 17 00:00:00 2001 From: hartkopp Date: Wed, 19 Jan 2011 17:43:07 +0000 Subject: [PATCH 1/1] 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 git-svn-id: svn://svn.berlios.de//socketcan/trunk@1232 030b6a49-0b11-0410-94ab-b0dab22257f2 --- can-utils/candump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/can-utils/candump.c b/can-utils/candump.c index 0581a3d..888c0fb 100644 --- a/can-utils/candump.c +++ b/can-utils/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.39.2