We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12f6a3f commit c62fb87Copy full SHA for c62fb87
1 file changed
src/main.c
@@ -87,6 +87,23 @@ static const char* find_bundled_libc(void) {
87
88
return NULL;
89
}
90
+#ifdef _WIN32
91
+#include <windows.h>
92
+struct timespec {
93
+ time_t tv_sec;
94
+ long tv_nsec;
95
+};
96
+
97
+static int clock_gettime(int unused, struct timespec *ts) {
98
+ LARGE_INTEGER freq, counter;
99
+ QueryPerformanceFrequency(&freq);
100
+ QueryPerformanceCounter(&counter);
101
+ ts->tv_sec = counter.QuadPart / freq.QuadPart;
102
+ ts->tv_nsec = (counter.QuadPart % freq.QuadPart) * 1000000000 / freq.QuadPart;
103
+ return 0;
104
+}
105
+#define CLOCK_MONOTONIC 1
106
+#endif
107
int main(int argc, char **argv) {
108
if (argc < 2) {
109
fprintf(stderr, "OVERVIEW: Vix Compiler\n\n");
0 commit comments