blueloveTH 6 дней назад
Родитель
Сommit
554e9634d6
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/modules/time.c

+ 2 - 1
src/modules/time.c

@@ -18,7 +18,8 @@
 #ifndef __circle__
 #ifndef __circle__
 
 
 int64_t time_ns() {
 int64_t time_ns() {
-#ifdef _WIN32
+#if _WIN32 && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0602
+    // windows 8 and later have GetSystemTimePreciseAsFileTime
     FILETIME system_time;
     FILETIME system_time;
     ULARGE_INTEGER large;
     ULARGE_INTEGER large;