From db0b8c2d2c9fcd1544b93822a676da9a0e252b8a Mon Sep 17 00:00:00 2001 From: sidney Date: Fri, 27 Dec 2024 00:21:50 +0100 Subject: [PATCH] Check if we have it working now on the MinGW32 and 64 compilers. --- src/sim65/peripherals.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sim65/peripherals.c b/src/sim65/peripherals.c index 0ad11a5bf..81d397c2f 100644 --- a/src/sim65/peripherals.c +++ b/src/sim65/peripherals.c @@ -65,10 +65,11 @@ void PeripheralsWriteByte (uint8_t Addr, uint8_t Val) struct timespec ts; -#if defined(_WIN32) - /* clock_gettime() is not available on Windows. Use timespec_get() instead. */ +#if defined(_MSC_VER) + /* clock_gettime() is not available in the Visual Studio compiler. Use timespec_get() instead. */ bool time_valid = timespec_get(&ts, TIME_UTC) == TIME_UTC; #else + /* clock_gettime() is available on Linux, MacOS, MinGW32, and MinGW64. bool time_valid = clock_gettime(CLOCK_REALTIME, &ts) == 0; #endif if (time_valid) {