This commit is contained in:
Meco Man 2021-02-07 22:33:37 +08:00
parent d92f8a53da
commit 4c6962436a
1 changed files with 1 additions and 2 deletions

View File

@ -213,10 +213,9 @@ RT_WEAK clock_t clock(void)
/* TODO: timezone */
int gettimeofday(struct timeval *tp, struct timezone *tz)
{
time_t t = time(RT_NULL);
if (tp != RT_NULL)
{
tp->tv_sec = t;
tp->tv_sec = time(RT_NULL);
tp->tv_usec = 0;
}
return 0;