From 32533127584b6bf98754591a168b5f2962d02ee1 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Fri, 5 Mar 2021 23:09:00 +0800 Subject: [PATCH] remove difftime() --- components/libc/compilers/common/time.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index c2fbd6f333..cc135bcfc9 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -12,7 +12,6 @@ * 2021-02-08 Meco Man add settimeofday() stime() * 2021-02-10 Meco Man add ctime_r() and re-implement ctime() * 2021-02-11 Meco Man fix bug #3183 - align days[] and months[] to 4 bytes - * add difftime() * 2021-02-12 Meco Man add errno * 2012-12-08 Bernard fix the issue of _timevalue.tv_usec initialization, * which found by Rob @@ -177,12 +176,6 @@ char* ctime(const time_t *tim_p) } RTM_EXPORT(ctime); -double difftime (time_t tim1, time_t tim2) -{ - return (double)(tim1 - tim2); -} -RTM_EXPORT(difftime); - /** * Returns the current time. * @@ -372,6 +365,9 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz) } RTM_EXPORT(settimeofday); +RTM_EXPORT(difftime); /* inherent in libc */ +RTM_EXPORT(strftime); /* inherent in libc*/ + #ifdef RT_USING_POSIX static struct timeval _timevalue; static int clock_time_system_init() -- GitLab