summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-03-03 23:59:14 +0800
committerGitHub <[email protected]>2020-03-03 23:59:14 +0800
commit87a8585e36194137c1a46678279d2c10f91096bf (patch)
treef263d9ff21077be08415f868f0eeb38571503966 /components
parentd81ab720d34a14b9d503d9a362f93744029eacd4 (diff)
parent48b9ab570f88ef7ff763de60882c185bbddc0f71 (diff)
Merge pull request #3423 from djndl1/cppthread
make clock_time.h available to C++
Diffstat (limited to 'components')
-rw-r--r--components/libc/time/clock_time.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/libc/time/clock_time.h b/components/libc/time/clock_time.h
index 7feb0390a4..16b2306f4b 100644
--- a/components/libc/time/clock_time.h
+++ b/components/libc/time/clock_time.h
@@ -11,6 +11,10 @@
#ifndef CLOCK_TIME_H__
#define CLOCK_TIME_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* posix clock and timer */
#define MILLISECOND_PER_SECOND 1000UL
#define MICROSECOND_PER_SECOND 1000000UL
@@ -41,4 +45,8 @@ int clock_getres (clockid_t clockid, struct timespec *res);
int clock_gettime (clockid_t clockid, struct timespec *tp);
int clock_settime (clockid_t clockid, const struct timespec *tp);
+#ifdef __cplusplus
+}
+#endif
+
#endif