diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/mingw.c | 13 | ||||
-rw-r--r-- | win32/sys/syscall.h | 0 |
2 files changed, 13 insertions, 0 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index 91c52b75c..2de07122e 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -927,6 +927,19 @@ int gettimeofday(struct timeval *tv, void *tz UNUSED_PARAM) | |||
927 | return 0; | 927 | return 0; |
928 | } | 928 | } |
929 | 929 | ||
930 | int clock_gettime(clockid_t clockid, struct timespec *tp) | ||
931 | { | ||
932 | FILETIME ft; | ||
933 | |||
934 | if (clockid != CLOCK_REALTIME) { | ||
935 | errno = ENOSYS; | ||
936 | return -1; | ||
937 | } | ||
938 | GetSystemTimeAsFileTime(&ft); | ||
939 | *tp = filetime_to_timespec(&ft); | ||
940 | return 0; | ||
941 | } | ||
942 | |||
930 | int pipe(int filedes[2]) | 943 | int pipe(int filedes[2]) |
931 | { | 944 | { |
932 | if (_pipe(filedes, PIPE_BUF, 0) < 0) | 945 | if (_pipe(filedes, PIPE_BUF, 0) < 0) |
diff --git a/win32/sys/syscall.h b/win32/sys/syscall.h new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/win32/sys/syscall.h | |||