Merge pull request #2931 from systemd/revert-2843-clock_boottime

Revert "time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported"
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-04-02 20:55:24 -04:00
+2 -5
View File
@@ -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;