@@ -11,9 +11,7 @@
11#include <unistd.h>
11#include <unistd.h>
13#ifdef _WIN32
13#ifdef _WIN32
14−int win_fpoll(void* h);
14+#include "windows/win_utils.h"
15−FILE *win32_u8fopen(const char *path, const char *mode);
16−FILE *win32_u8popen(const char *path, const char *mode);
18#include <sys/select.h>
16#include <sys/select.h>
@@ -209,9 +207,11 @@ VAL idris_time() {
209VAL idris_clock(VM* vm) {
207VAL idris_clock(VM* vm) {
210 VAL result;
208 VAL result;
211#ifdef _WIN32
209#ifdef _WIN32
211+ win32_gettime(&sec, &nsec);
212 idris_constructor(result, vm, 0, 2, 0);
212 idris_constructor(result, vm, 0, 2, 0);
213− idris_setConArg(result, 0, MKBIGI(0));
213+ idris_setConArg(result, 0, MKBIGI(sec));
214− idris_setConArg(result, 1, MKBIGI(0));
214+ idris_setConArg(result, 1, MKBIGI(nsec));
216 struct timespec ts;
216 struct timespec ts;
217 // We're not checking the result here, which is of course bad, but
217 // We're not checking the result here, which is of course bad, but