From 956404177b2e4347c35fb38657bfc94f24593c8b Mon Sep 17 00:00:00 2001 From: Max Qian <64824374+AstroAir@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:04:22 +0800 Subject: [PATCH] Update time.c --- src/modules/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/time.c b/src/modules/time.c index e453e5a4..a44cde04 100644 --- a/src/modules/time.c +++ b/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); -} \ No newline at end of file +}