summaryrefslogtreecommitdiff
path: root/src/lib/clock_gettime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/clock_gettime.c')
-rw-r--r--src/lib/clock_gettime.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/lib/clock_gettime.c b/src/lib/clock_gettime.c
index 77409c71a..e9d347438 100644
--- a/src/lib/clock_gettime.c
+++ b/src/lib/clock_gettime.c
@@ -18,20 +18,20 @@
#include "cvc4_private.h"
-#include <stdio.h>
-#include <errno.h>
-#include <time.h>
-
#include "lib/clock_gettime.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#ifndef __APPLE__
-# warning This code assumes you're on Mac OS X, and you don't seem to be. You'll likely have problems.
-#endif /* __APPLE__ */
+#if !(defined(__APPLE__) || defined(__WIN32__))
+# warning "This code assumes you're on Mac OS X or Win32, and you don't seem to be. You'll likely have problems."
+#endif /* !(__APPLE__ || __WIN32__) */
+#ifdef __APPLE__
+
+#include <stdio.h>
+#include <errno.h>
#include <mach/mach_time.h>
static double s_clockconv = 0.0;
@@ -64,6 +64,15 @@ long clock_gettime(clockid_t which_clock, struct timespec *tp) {
return 0;
}
+#else /* else we're __WIN32__ */
+
+long clock_gettime(clockid_t which_clock, struct timespec *tp) {
+ // unsupported on Windows
+ return 0;
+}
+
+#endif /* __APPLE__ / __WIN32__ */
+
#ifdef __cplusplus
}/* extern "C" */
#endif /* __cplusplus */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback