We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e4f0ec commit 3c4bff5Copy full SHA for 3c4bff5
components/libc/compilers/common/ctime.c
@@ -497,6 +497,11 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
497
{
498
return 0;
499
}
500
+ else
501
+ {
502
+ // if RTC device is not available, use tick count
503
+ tv->tv_sec = rt_tick_get() / RT_TICK_PER_SECOND;
504
+ }
505
506
507
#endif /* RT_USING_RTC */
0 commit comments