summaryrefslogtreecommitdiff
path: root/src/shared/label.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/shared/label.c
parent911963f1a29897eee2fffbe503ac05ec13028a30 (diff)
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/shared/label.c')
-rw-r--r--src/shared/label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/label.c b/src/shared/label.c
index a8bf6bd4f9..1fe4574633 100644
--- a/src/shared/label.c
+++ b/src/shared/label.c
@@ -82,7 +82,7 @@ int label_init(const char *prefix) {
l = after_mallinfo.uordblks > before_mallinfo.uordblks ? after_mallinfo.uordblks - before_mallinfo.uordblks : 0;
log_debug("Successfully loaded SELinux database in %s, size on heap is %iK.",
- format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp),
+ format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0),
(l+1023)/1024);
}
#endif