From ee6e39305c55d04e647c294898568ed1d3699638 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 7 Jan 2019 21:31:34 +0000 Subject: include: add indirect monotonic clock id specifier Avoid repeated ifdef checks in code by adding a project specific preprocessor definition. Signed-off-by: Sami Kerola --- include/monotonic.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/monotonic.h b/include/monotonic.h index a499fa34a..296173ece 100644 --- a/include/monotonic.h +++ b/include/monotonic.h @@ -1,6 +1,12 @@ #ifndef UTIL_LINUX_MONOTONIC_H #define UTIL_LINUX_MONOTONIC_H +# ifdef CLOCK_MONOTONIC_RAW +# define UL_CLOCK_MONOTONIC CLOCK_MONOTONIC_RAW +# else +# define UL_CLOCK_MONOTONIC CLOCK_MONOTONIC +# endif + #include extern int get_boot_time(struct timeval *boot_time); -- cgit v1.2.3-55-g7522