summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-31 14:24:10 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-31 14:24:10 +0200
commit63b63e0f6ab9f743fc34623bb1caa9852227f046 (patch)
tree721c6c6a7b394dc758ffa12bb3a1261d9817207f /include
parent52db4952d80a10aae464274acdd7401267818b28 (diff)
parent04eb03136466a18d81511e7ccadf51c08faa8edb (diff)
downloadouroboros-63b63e0f6ab9f743fc34623bb1caa9852227f046.tar.gz
ouroboros-63b63e0f6ab9f743fc34623bb1caa9852227f046.zip
Merged in dstaesse/ouroboros/be-apple (pull request #230)
lib, ipcp: Compile on Apple junk
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/time_utils.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/ouroboros/time_utils.h b/include/ouroboros/time_utils.h
index e097a01f..0b65a2b4 100644
--- a/include/ouroboros/time_utils.h
+++ b/include/ouroboros/time_utils.h
@@ -78,4 +78,26 @@ int tv_to_ts(const struct timeval * src,
int ts_to_tv(const struct timespec * src,
struct timeval * dst);
+#ifdef __APPLE__ /* morons */
+
+/* taken from time.h */
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+#define CLOCK_PROCESS_CPUTIME_ID 2
+#define CLOCK_THREAD_CPUTIME_ID 3
+#define CLOCK_MONOTONIC_RAW 4
+#define CLOCK_REALTIME_COARSE 5
+#define CLOCK_MONOTONIC_COARSE 6
+#define CLOCK_BOOTTIME 7
+#define CLOCK_REALTIME_ALARM 8
+#define CLOCK_BOOTTIME_ALARM 9
+#define CLOCK_SGI_CYCLE 10 /* Hardware specific */
+#define CLOCK_TAI 11
+
+#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
+#define CLOCKS_MONO CLOCK_MONOTONIC
+
+int clock_gettime(int clock, struct timespec * t);
+#endif
+
#endif /* OUROBOROS_TIME_UTILS_H */