projects
/
profile
/
ivi
/
can-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d262a55
)
candump: Avoid ragged output of timestamp values when printing differential
author
Oliver Hartkopp
<socketcan@hartkopp.net>
Wed, 19 Jan 2011 17:43:07 +0000
(17:43 +0000)
committer
Oliver Hartkopp
<socketcan@hartkopp.net>
Wed, 19 Jan 2011 17:43:07 +0000
(17:43 +0000)
timestamps (commandline option -td).
Idea & original patch by Uwe Bonnes.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
candump.c
patch
|
blob
|
history
diff --git
a/candump.c
b/candump.c
index
0581a3d
..
888c0fb
100644
(file)
--- 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("(%
03
ld.%06ld) ", diff.tv_sec, diff.tv_usec);
if (timestamp == 'd')
last_tv = tv; /* update for delta calculation */