diff options
| author | liuxianliang <[email protected]> | 2021-03-30 10:25:00 +0800 |
|---|---|---|
| committer | liuxianliang <[email protected]> | 2021-03-30 10:25:00 +0800 |
| commit | 6d89a9f120e2154399ca6123750dca0a78e9512d (patch) | |
| tree | 4b6c623d9b5f2df6facad58823628c130f9a007b /components/libc/compilers | |
| parent | adaa45eebeaf1a772ba57bca76ef9bd04ef7fb90 (diff) | |
| parent | 69c01563688855abbc7b5864ede37cde1cecba16 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into develop_one
Diffstat (limited to 'components/libc/compilers')
| -rw-r--r-- | components/libc/compilers/common/time.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index 083ae9be6c..83b6ed5672 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -21,10 +21,15 @@ #include <sys/time.h> #include <rtthread.h> + #ifdef RT_USING_DEVICE #include <rtdevice.h> #endif +#define DBG_TAG "TIME" +#define DBG_LVL DBG_INFO +#include <rtdbg.h> + /* seconds per day */ #define SPD 24*60*60 @@ -219,6 +224,7 @@ RT_WEAK time_t time(time_t *t) if(time_now == (time_t)-1) { + LOG_W("Cannot find a RTC device to provide time!"); errno = ENOSYS; } @@ -246,12 +252,13 @@ int stime(const time_t *t) } else { + LOG_W("Cannot find a RTC device to provide time!"); errno = ENOSYS; return -1; } return 0; - #else + LOG_W("Cannot find a RTC device to provide time!"); errno = ENOSYS; return -1; #endif /* RT_USING_RTC */ |
