Fix clock_gettime conflict (MinGW)

This commit is contained in:
maron2000
2025-05-10 12:42:25 +09:00
parent 72416e94d5
commit 374605e5cb

View File

@@ -5085,6 +5085,7 @@ extern "C" {
return (t);
}
#ifndef WIN_PTHREADS_TIME_H
int clock_gettime(int X, struct timespec *tv) {
LARGE_INTEGER t;
FILETIME f;
@@ -5122,6 +5123,7 @@ extern "C" {
tv->tv_nsec = t.QuadPart % 1000000 * 1000;
return (0);
}
#endif
#elif __APPLE__ && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 1