summaryrefslogtreecommitdiff
path: root/components/libc/time
diff options
context:
space:
mode:
authorxph <[email protected]>2020-04-09 16:35:28 +0800
committerGitHub <[email protected]>2020-04-09 16:35:28 +0800
commitca7f01d79b3e0a997c771cec298e4ebd65b75809 (patch)
tree3d2c48aae7203b14038ba7b98b500b5343ed7f2a /components/libc/time
parentf763f8e7284b0492c5a65ad0abf94ee1963d7dcc (diff)
parentbaa3145bfe61b3330b6a160523cc5470fa5db3a7 (diff)
Merge pull request #1 from RT-Thread/master
sync rtt
Diffstat (limited to 'components/libc/time')
-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