Răsfoiți Sursa

Merge pull request #311 from AstroAir/main

Update time.c
BLUELOVETH 1 an în urmă
părinte
comite
fc0d94c12e
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/modules/time.c

+ 2 - 2
src/modules/time.c

@@ -6,7 +6,7 @@
 
 static bool get_ns(int64_t* out) {
     struct timespec tms;
-#ifdef __ANDROID__
+#if defined( __ANDROID__) || defined(__MINGW32__) || defined(__MINGW64__)
     clock_gettime(CLOCK_REALTIME, &tms);
 #else
     /* The C11 way */
@@ -102,4 +102,4 @@ void pk__add_module_time() {
     py_bindfunc(mod, "time_ns", time_time_ns);
     py_bindfunc(mod, "sleep", time_sleep);
     py_bindfunc(mod, "localtime", time_localtime);
-}
+}