diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-12 19:14:25 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-12 19:14:25 -0500 |
commit | 384de57271eef82e15a3088548817e629728d50e (patch) | |
tree | eea5c491a248765d1eb1ab5de6d4baf46374295d /src/libsystemd | |
parent | 736ffecc9cf58a0d2c5f147a1f56f2c3532c10ce (diff) | |
parent | 32c1f5a57998f2a9e1992af006b83e39e3155830 (diff) |
Merge pull request #2600 from poettering/s390-alarm-clock
time-util: map ALARM clockids to non-ALARM clockids in now()
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index deef6ba9d3..2b46a1ff06 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -2780,9 +2780,13 @@ _public_ int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec) { *usec = e->timestamp.monotonic; break; - default: + case CLOCK_BOOTTIME: + case CLOCK_BOOTTIME_ALARM: *usec = e->timestamp_boottime; break; + + default: + assert_not_reached("Unknown clock?"); } return 0; |