summaryrefslogtreecommitdiff
path: root/src/basic/time-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-20 18:12:57 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-22 16:06:20 +0200
commit3411372e35fd199d46910b79b8017e9e4ffc8da8 (patch)
treeef9d747d66b0f4df902e4e9ab3b2d9b0379d9efe /src/basic/time-util.h
parentf53d86c9295d9ac20981ca26beb6b83ad1f4296d (diff)
tree-wide: don't assume CLOCK_BOOTIME is generally available
Before we invoke now(CLOCK_BOOTTIME), let's make sure we actually have that clock, since now() will otherwise hit an assert. Specifically, let's refuse CLOCK_BOOTTIME early in sd-event if the kernel doesn't actually support it. This is a follow-up for #3037, and specifically: https://github.com/systemd/systemd/pull/3037#issuecomment-210199167
Diffstat (limited to 'src/basic/time-util.h')
-rw-r--r--src/basic/time-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/time-util.h b/src/basic/time-util.h
index 77e3cd08d4..a5e3f567ec 100644
--- a/src/basic/time-util.h
+++ b/src/basic/time-util.h
@@ -112,6 +112,7 @@ bool ntp_synced(void);
int get_timezones(char ***l);
bool timezone_is_valid(const char *name);
+bool clock_boottime_supported(void);
clockid_t clock_boottime_or_monotonic(void);
#define xstrftime(buf, fmt, tm) \