Преглед на файлове

[libc][time] 解决部分编译平台CLOCKS_PER_SEC无法被重新定义的问题

Meco Man преди 2 години
родител
ревизия
721c08dc61
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      components/libc/compilers/common/include/sys/time.h

+ 3 - 0
components/libc/compilers/common/include/sys/time.h

@@ -24,6 +24,9 @@ typedef __time64_t time_t;
 extern "C" {
 #endif
 
+#undef CLOCKS_PER_SEC
+#define CLOCKS_PER_SEC RT_TICK_PER_SECOND
+
 /* timezone */
 #define DST_NONE    0   /* not on dst */
 #define DST_USA     1   /* USA style dst */