diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-02 20:55:24 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-02 20:55:24 -0400 |
commit | 7e371b64fe6995e8f12b3f082c54a6d0d46de512 (patch) | |
tree | 63300678b760b78cac130449de1effa0b4e8c7f4 /src/basic/time-util.c | |
parent | a0bfc9c26a2cc44b95b1a02200cb999dedf9c0c3 (diff) | |
parent | bdf19f8fb2f4f2eff2c80bc629f7f6115c04c6e6 (diff) |
Merge pull request #2931 from systemd/revert-2843-clock_boottime
Revert "time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported"
Diffstat (limited to 'src/basic/time-util.c')
-rw-r--r-- | src/basic/time-util.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/basic/time-util.c b/src/basic/time-util.c index c16460a198..7ca764abeb 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -47,15 +47,12 @@ static clockid_t map_clock_id(clockid_t c) { /* Some more exotic archs (s390, ppc, …) lack the "ALARM" flavour of the clocks. Thus, clock_gettime() will * fail for them. Since they are essentially the same as their non-ALARM pendants (their only difference is * when timers are set on them), let's just map them accordingly. This way, we can get the correct time even on - * those archs. - * - * Also, older kernels don't support CLOCK_BOOTTIME: fall back to CLOCK_MONOTONIC. */ + * those archs. */ switch (c) { - case CLOCK_BOOTTIME: case CLOCK_BOOTTIME_ALARM: - return clock_boottime_or_monotonic (); + return CLOCK_BOOTTIME; case CLOCK_REALTIME_ALARM: return CLOCK_REALTIME; |