summaryrefslogtreecommitdiffstats
path: root/src/journal/test-journal-verify.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-04 02:56:56 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-04 02:56:56 +0200
commit2fa4092c2829dd14e50c430ae2f23551d23c6c1d (patch)
treeacc0b56b0f7f1f93afde6a0feb8f38c332236352 /src/journal/test-journal-verify.c
parentupdate TODO (diff)
downloadsystemd-2fa4092c2829dd14e50c430ae2f23551d23c6c1d.tar.xz
systemd-2fa4092c2829dd14e50c430ae2f23551d23c6c1d.zip
util: make time formatting a bit smarter
Instead of outputting "5h 55s 50ms 3us" we'll now output "5h 55.050003s". Also, while outputting the accuracy is configurable. Basically we now try use "dot notation" for all time values > 1min. For >= 1s we use 's' as unit, otherwise for >= 1ms we use 'ms' as unit, and finally 'us'. This should give reasonably values in most cases.
Diffstat (limited to 'src/journal/test-journal-verify.c')
-rw-r--r--src/journal/test-journal-verify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/test-journal-verify.c b/src/journal/test-journal-verify.c
index b6677215c0..ad2e2d4c3b 100644
--- a/src/journal/test-journal-verify.c
+++ b/src/journal/test-journal-verify.c
@@ -117,7 +117,7 @@ int main(int argc, char *argv[]) {
log_info("=> Validated from %s to %s, %s missing",
format_timestamp(a, sizeof(a), from),
format_timestamp(b, sizeof(b), to),
- format_timespan(c, sizeof(c), total > to ? total - to : 0));
+ format_timespan(c, sizeof(c), total > to ? total - to : 0, 0));
}
journal_file_close(f);