add clock id macros for a number of new(ish) Linux-specific clocks
authorRich Felker <dalias@aerifal.cx>
Sat, 8 Jun 2013 15:42:52 +0000 (11:42 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 8 Jun 2013 15:42:52 +0000 (11:42 -0400)
arguably CLOCK_MONOTONIC should be redirected to CLOCK_BOOTTIME with a
fallback for old kernels that don't support it, since Linux's
CLOCK_BOOTTIME semantics seem to match the spirit of the POSIX
requirements for CLOCK_MONOTONIC better than Linux's version of
CLOCK_MONOTONIC does. however, this is a change that would require
further discussion and research, so for now, I'm simply making them
all available.

include/time.h

index 56ffacf5109ba2120d33fcfd59efbfe5d2faa270..5b3dde5bbc83d3e578795bff443204d5872c5557 100644 (file)
@@ -81,6 +81,12 @@ struct itimerspec
 #define CLOCK_MONOTONIC          1
 #define CLOCK_PROCESS_CPUTIME_ID 2
 #define CLOCK_THREAD_CPUTIME_ID  3
+#define CLOCK_MONOTONIC_RAW      4
+#define CLOCK_REALTIME_COURSE    5
+#define CLOCK_MONOTONIC_COURSE   6
+#define CLOCK_BOOTTIME           7
+#define CLOCK_REALTIME_ALARM     8
+#define CLOCK_BOOTTIME_ALARM     9
 
 #define TIMER_ABSTIME 1