summaryrefslogtreecommitdiff
path: root/src/shared/time-util.h
Commit message (Collapse)AuthorAge
* Prep v221: Update and clean up build system to sync with upstreamSven Eden2017-03-14
| | | | | | | | | | | | | | This commit replays the moving around of source files that have been done between systemd-219 and systemd-221. Further the Makefile.am is synchronized with the upstream version and then "re-cleaned". A lot of functions, that are not used anywhere in elogind have been coated into #if 0/#endif directives to further shorten the list of dependencies. All unneeded files have been removed.
* core: make unit deserialization more defensiveLennart Poettering2017-03-14
|
* core: use some nice macros where appropriateLennart Poettering2015-02-03
|
* time-util: let's make xstrftime() useful for everybody, even if we only have ↵Lennart Poettering2015-02-02
| | | | a single user so far.
* util: avoid duplication of TIME_T_MAXRonny Chevalier2014-10-21
|
* time: functions named "internal" really shouldn't be exportedLennart Poettering2014-10-08
| | | | | Also, let's try to make function names descriptive, instead of using bools for flags.
* journalctl: make --utc work everywhereJan Synacek2014-10-03
| | | | | | The --utc option was introduced by commit 9fd290443f5f99fca0dcd4216b1de70f7d3b8db1. Howerver, the implementation was incomplete.
* time-util: add and use USEC/NSEC_INFINIYKay Sievers2014-07-29
|
* time-util: add clock_boottime_or_monotonicTom Gundersen2014-07-24
| | | | | | CLOCK_BOOTTIME is not supported by timerfd on older kernels, so for the time beeing, use this helper instead which will fallback to CLOCK_MONOTONIC if CLOCK_BOOTTIME is not supported.
* shared: make timezone and locale enumeration and validation genericLennart Poettering2014-07-07
| | | | | This way we can reuse it other code thatn just localectl/localed + timedatectl/timedated.
* coredumpctl: fix columns sizing for timestampLennart Poettering2014-06-19
|
* time-util: make sure USEC_PER_SEC and friends are actually of type usec_tLennart Poettering2014-05-22
|
* Use format patterns for usec_t, pid_t, nsec_t, usec_tZbigniew Jędrzejewski-Szmek2014-01-02
| | | | | | | | It is nicer to predefine patterns using configure time check instead of using casts everywhere. Since we do not need to use any flags, include "%" in the format instead of excluding it like PRI* macros.
* service: clean up watchdog logic a bitLennart Poettering2013-12-11
|
* timer: consider (usec_t) -1 an invalid timestampLennart Poettering2013-11-11
|
* timedated: expose time and NTP sync flag via the busLennart Poettering2013-10-17
| | | | | This way, timedatectl can be run over the network and determine all properties correctly from the server rather than the client.
* logs-show: add short-precise mode with us timestampsZbigniew Jędrzejewski-Szmek2013-08-20
| | | | | | Also, always show us timestamps in verbose mode. https://bugzilla.redhat.com/show_bug.cgi?id=991678
* Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek2013-05-02
| | | | | | | | I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls.
* util: make time formatting a bit smarterLennart Poettering2013-04-04
| | | | | | | | | | | 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.
* time: add suppot for fractional time specificationsLennart Poettering2013-04-03
| | | | | 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.
* util: rename parse_usec() to parse_sec() sinds the default unit is secondsLennart Poettering2013-04-03
| | | | | | | | 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.
* core: properly initialize kernel timestampLennart Poettering2013-01-08
|
* shared: FORMAT_TIMESTAMP_MAX -- include space for unicode weekdaysKay Sievers2012-11-24
| | | | | | | | | | | | | | | | | | | | $ LANG=el_GR.UTF-8 ./timedatectl Local time: Σαβ 2012-11-24 14:53:05 CET Universal time: Σαβ 2012-11-24 13:53:05 UTC RTC time: Σαβ 2012-11-24 13:53:04 Timezone: Europe/Berlin (CET, +0100) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: no Last DST change: DST ended at Κυρ 2012-10-28 02:59:59 CEST Κυρ 2012-10-28 02:00:00 CET Next DST change: DST begins (the clock jumps one hour forward) at Κυρ 2013-03-31 01:59:59 CET Κυρ 2013-03-31 03:00:00 CEST https://bugs.freedesktop.org/show_bug.cgi?id=57470
* time-util: also rename FORMAT_TIMESTAMP_PRETTY → _MAXLennart Poettering2012-11-23
|
* util: rename format_timestamp_pretty() to format_timestamp_relative() ↵Lennart Poettering2012-11-23
| | | | because that describes much better what it does
* util: split off time related calls from util.[ch] into time-util.[ch]Lennart Poettering2012-11-23