diff --git a/components/libc/minilibc/time.c b/components/libc/minilibc/time.c index 8faa3e047089aa953591e90374df68ce7c8c186b..efd6be8754950b130b801b86cae333920cdbb634 100644 --- a/components/libc/minilibc/time.c +++ b/components/libc/minilibc/time.c @@ -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