Ver código fonte

Support the ESP8266 embedded hardware

pixelherodev 6 anos atrás
pai
commit
5d8f65a021
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      sokol_time.h

+ 4 - 0
sokol_time.h

@@ -164,6 +164,10 @@ typedef struct {
     double start;
 } _stm_state_t;
 #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>
 typedef struct {
     uint32_t initialized;