提交 5b73dfa0 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #731 from ArdaFu/master

[libc] Add dummy _gettimeofday function when hardware do not have the…
......@@ -217,3 +217,13 @@ int gettimeofday(struct timeval *tp, void *ignore)
return 0;
}
#endif
#ifndef _gettimeofday
/* Dummy function when hardware do not have RTC */
int _gettimeofday( struct timeval *tv, void *ignore)
{
tv->tv_sec = 0; // convert to seconds
tv->tv_usec = 0; // get remaining microseconds
return 0; // return non-zero for error
}
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册