chiark / gitweb /
util: make time formatting a bit smarter
authorLennart Poettering <lennart@poettering.net>
Thu, 4 Apr 2013 00:56:56 +0000 (02:56 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 Apr 2013 00:56:56 +0000 (02:56 +0200)
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.


No differences found