mirror of
https://github.com/cc65/cc65.git
synced 2025-02-07 04:31:38 +00:00
Check if we have it working now on the MinGW32 and 64 compilers.
This commit is contained in:
parent
ae3106af4a
commit
db0b8c2d2c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user