mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-31 20:05:59 +08:00
Merge pull request #4422 from mysterywolf/libctime
[libc] remove difftime()
This commit is contained in:
@@ -12,7 +12,6 @@
|
|||||||
* 2021-02-08 Meco Man add settimeofday() stime()
|
* 2021-02-08 Meco Man add settimeofday() stime()
|
||||||
* 2021-02-10 Meco Man add ctime_r() and re-implement ctime()
|
* 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
|
* 2021-02-11 Meco Man fix bug #3183 - align days[] and months[] to 4 bytes
|
||||||
* add difftime()
|
|
||||||
* 2021-02-12 Meco Man add errno
|
* 2021-02-12 Meco Man add errno
|
||||||
* 2012-12-08 Bernard <clock_time.c> fix the issue of _timevalue.tv_usec initialization,
|
* 2012-12-08 Bernard <clock_time.c> fix the issue of _timevalue.tv_usec initialization,
|
||||||
* which found by Rob <rdent@iinet.net.au>
|
* which found by Rob <rdent@iinet.net.au>
|
||||||
@@ -177,12 +176,6 @@ char* ctime(const time_t *tim_p)
|
|||||||
}
|
}
|
||||||
RTM_EXPORT(ctime);
|
RTM_EXPORT(ctime);
|
||||||
|
|
||||||
double difftime (time_t tim1, time_t tim2)
|
|
||||||
{
|
|
||||||
return (double)(tim1 - tim2);
|
|
||||||
}
|
|
||||||
RTM_EXPORT(difftime);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current time.
|
* Returns the current time.
|
||||||
*
|
*
|
||||||
@@ -372,6 +365,10 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz)
|
|||||||
}
|
}
|
||||||
RTM_EXPORT(settimeofday);
|
RTM_EXPORT(settimeofday);
|
||||||
|
|
||||||
|
/* inherent in the toolchain */
|
||||||
|
RTM_EXPORT(difftime);
|
||||||
|
RTM_EXPORT(strftime);
|
||||||
|
|
||||||
#ifdef RT_USING_POSIX
|
#ifdef RT_USING_POSIX
|
||||||
static struct timeval _timevalue;
|
static struct timeval _timevalue;
|
||||||
static int clock_time_system_init()
|
static int clock_time_system_init()
|
||||||
|
|||||||
Reference in New Issue
Block a user