4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 21:13:32 +08:00

Merge pull request #731 from ArdaFu/master

[libc] Add dummy _gettimeofday function when hardware do not have the…
This commit is contained in:
Bernard Xiong 2017-05-05 18:01:50 +08:00 committed by GitHub
commit 5b73dfa0d5

View File

@ -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