diff options
| author | Bernard Xiong <[email protected]> | 2021-04-15 17:36:45 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-15 17:36:45 +0800 |
| commit | 979ac3d8d406d5fcaefc8714c44ca77aec27915f (patch) | |
| tree | 4be2ddfb4377dd843c9c5deca70300e78a727ad4 /components/libc/compilers/common/sys | |
| parent | dfeacfb6861fe4565ccd1c54f3e929b442b74e3d (diff) | |
| parent | 46d51a99f1b92738a2955245527ad8e18bcf96a5 (diff) | |
Merge pull request #4616 from mysterywolf/time
[libc][time] implement set_timeval
Diffstat (limited to 'components/libc/compilers/common/sys')
| -rw-r--r-- | components/libc/compilers/common/sys/time.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h index 2a40b7b805..ef1c810608 100644 --- a/components/libc/compilers/common/sys/time.h +++ b/components/libc/compilers/common/sys/time.h @@ -40,7 +40,7 @@ struct timeval { #endif #endif /* _TIMEVAL_DEFINED */ -#if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)) && !defined (__ICCARM__) && !defined (_WIN32) +#if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/) && !defined (__ICCARM__) && !defined (_WIN32) struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ @@ -56,6 +56,9 @@ int stime(const time_t *t); time_t timegm(struct tm * const t); int gettimeofday(struct timeval *tv, struct timezone *tz); int settimeofday(const struct timeval *tv, const struct timezone *tz); +#if defined(__ARMCC_VERSION) || defined (__ICCARM__) +struct tm *gmtime_r(const time_t *timep, struct tm *r); +#endif #ifdef RT_USING_POSIX #include <sys/types.h> |
