summaryrefslogtreecommitdiff
path: root/src/test/test-efivars.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/test/test-efivars.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/test/test-efivars.c')
-rw-r--r--src/test/test-efivars.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-efivars.c b/src/test/test-efivars.c
index e54a83665a..43ea5917b6 100644
--- a/src/test/test-efivars.c
+++ b/src/test/test-efivars.c
@@ -36,8 +36,8 @@ int main(int argc, char* argv[]) {
return 1;
}
- log_info("Firmware began %s before kernel.", format_timespan(s, sizeof(s), fw.monotonic));
- log_info("Loader began %s before kernel.", format_timespan(s, sizeof(s), l.monotonic));
+ log_info("Firmware began %s before kernel.", format_timespan(s, sizeof(s), fw.monotonic, 0));
+ log_info("Loader began %s before kernel.", format_timespan(s, sizeof(s), l.monotonic, 0));
log_info("Firmware began %s.", format_timestamp(s, sizeof(s), fw.realtime));
log_info("Loader began %s.", format_timestamp(s, sizeof(s), l.realtime));