summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-02-17 12:30:09 +0800
committerGitHub <[email protected]>2021-02-17 12:30:09 +0800
commit9bfab03b742f2cb6cb53ba350d0d760c5691f9fb (patch)
tree77378226c0e89124f79ef7568db885ac70675b1d
parent51c492881aafc4d7a904e8c4488f42ab1c2e1d23 (diff)
parent3392d7fe509065b4ed56135c89fe7b6b6cb83fdb (diff)
Merge pull request #4345 from mysterywolf/clock
[libc][newlib]重定义CLOCKS_PER_SEC宏
-rw-r--r--components/libc/compilers/newlib/machine/time.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/libc/compilers/newlib/machine/time.h b/components/libc/compilers/newlib/machine/time.h
new file mode 100644
index 0000000000..d46533eb39
--- /dev/null
+++ b/components/libc/compilers/newlib/machine/time.h
@@ -0,0 +1,12 @@
+#ifndef _MACHTIME_H_
+#define _MACHTIME_H_
+
+#include <rtconfig.h>
+#define _CLOCKS_PER_SEC_ RT_TICK_PER_SECOND
+
+#ifdef __SPU__
+#include <sys/_timespec.h>
+int nanosleep (const struct timespec *, struct timespec *);
+#endif
+
+#endif /* _MACHTIME_H_ */