Skip to content

Commit ea22af5

Browse files
authored
Merge pull request #4422 from mysterywolf/libctime
[libc] remove difftime()
2 parents 89e0e0c + ff9210a commit ea22af5

File tree

1 file changed

+4
-7
lines changed
  • components/libc/compilers/common

1 file changed

+4
-7
lines changed

components/libc/compilers/common/time.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* 2021-02-08 Meco Man add settimeofday() stime()
1313
* 2021-02-10 Meco Man add ctime_r() and re-implement ctime()
1414
* 2021-02-11 Meco Man fix bug #3183 - align days[] and months[] to 4 bytes
15-
* add difftime()
1615
* 2021-02-12 Meco Man add errno
1716
* 2012-12-08 Bernard <clock_time.c> fix the issue of _timevalue.tv_usec initialization,
1817
* which found by Rob <[email protected]>
@@ -177,12 +176,6 @@ char* ctime(const time_t *tim_p)
177176
}
178177
RTM_EXPORT(ctime);
179178

180-
double difftime (time_t tim1, time_t tim2)
181-
{
182-
return (double)(tim1 - tim2);
183-
}
184-
RTM_EXPORT(difftime);
185-
186179
/**
187180
* Returns the current time.
188181
*
@@ -372,6 +365,10 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz)
372365
}
373366
RTM_EXPORT(settimeofday);
374367

368+
/* inherent in the toolchain */
369+
RTM_EXPORT(difftime);
370+
RTM_EXPORT(strftime);
371+
375372
#ifdef RT_USING_POSIX
376373
static struct timeval _timevalue;
377374
static int clock_time_system_init()

0 commit comments

Comments
 (0)