Bläddra i källkod

Support the ESP8266 embedded hardware

pixelherodev 6 år sedan
förälder
incheckning
5d8f65a021
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      sokol_time.h

+ 4 - 0
sokol_time.h

@@ -164,6 +164,10 @@ typedef struct {
     double start;
     double start;
 } _stm_state_t;
 } _stm_state_t;
 #else /* anything else, this will need more care for non-Linux platforms */
 #else /* anything else, this will need more care for non-Linux platforms */
+#ifdef ESP8266
+// On the ESP8266, clock_gettime ignores the first argument and CLOCK_MONOTONIC isn't defined
+#define CLOCK_MONOTONIC 0
+#endif
 #include <time.h>
 #include <time.h>
 typedef struct {
 typedef struct {
     uint32_t initialized;
     uint32_t initialized;