summaryrefslogtreecommitdiff
path: root/src/shared/time-util.c
AgeCommit message (Collapse)Author
2013-08-20logs-show: add short-precise mode with us timestampsZbigniew Jędrzejewski-Szmek
Also, always show us timestamps in verbose mode. https://bugzilla.redhat.com/show_bug.cgi?id=991678
2013-04-04util: tweak format_timespan() a bitLennart Poettering
Make sure to always print out at least one valid component instead of falling back early to 0.
2013-04-04util: make time formatting a bit smarterLennart Poettering
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.
2013-04-03time: add suppot for fractional time specificationsLennart Poettering
We can now parse "0.5s" as the same as "500ms". In fact, we can parse "3.45years" correctly, too, and any other unit and fraction length.
2013-04-03util: rename parse_usec() to parse_sec() sinds the default unit is secondsLennart Poettering
Internally we store all time values in usec_t, however parse_usec() actually was used mostly to parse values in seconds (unless explicit units were specified to define a different unit). Hence, be clear about this and name the function about what we pass into it, not what we get out of it.
2013-03-29Always use errno > 0 to help gccZbigniew Jędrzejewski-Szmek
gcc thinks that errno might be negative, and functions could return something positive on error (-errno). Should not matter in practice, but makes an -O4 build much quieter.
2013-01-10dbus: properly serialize calendar timer dataLennart Poettering
As it turns out the bus properties for timer units wre really broken, so let's clean this up for good and properly add calendar timer serialization. We really should get that right before finalizing the bus API documentation in the wiki...
2013-01-08core: properly initialize kernel timestampLennart Poettering
2012-11-23time-util: teach parse_timestamp to parse weekdaysLennart Poettering
2012-11-23path-util: when parsing a timestamp we don't know the timezoneLennart Poettering
2012-11-23util: teach parse_timestamp() to parse results of format_timestamp_relative()Lennart Poettering
2012-11-23util: rename format_timestamp_pretty() to format_timestamp_relative() ↵Lennart Poettering
because that describes much better what it does
2012-11-23util: split off time related calls from util.[ch] into time-util.[ch]Lennart Poettering