summaryrefslogtreecommitdiff
path: root/src/shared/time-util.c
AgeCommit message (Collapse)Author
2014-05-22time-util: make sure USEC_PER_SEC and friends are actually of type usec_tLennart Poettering
2014-05-15Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek
No functional change expected :)
2014-03-25time: support @ syntax for denoting times since the UNIX epoch 1970-1-1Lennart Poettering
2013-12-20logging: reduce send timeout to something more sensibleZbigniew Jędrzejewski-Szmek
For a user, the timeout of 1 min per message seems equivalent to a hang. If journald cannot process a message from PID1 for 10 ms then something is significantly wrong. It's better to lose the message and continue.
2013-12-15Fix a few signed/unsigned format string issuesZbigniew Jędrzejewski-Szmek
Since numbers involved are all small, behaviour was correct already. https://bugzilla.redhat.com/show_bug.cgi?id=1043304
2013-11-11timer: consider (usec_t) -1 an invalid timestampLennart Poettering
2013-11-11timer: properly format relative timestamps in the futureLennart Poettering
2013-10-21silent a few more gcc warningsKay Sievers
2013-10-17timedated: expose time and NTP sync flag via the busLennart Poettering
This way, timedatectl can be run over the network and determine all properties correctly from the server rather than the client.
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