libc/time: This commit adds the difftime() function. Since the function returns a double, I have isolated it in a CONFIG_LIBC_DIFFTIME option (It also depends on the toolchain-dependent CONFIG_HAVE_DOUBLE so is not available on tiny platforms).

This commit is contained in:
Sebastien Lorquet
2016-08-24 15:43:57 -06:00
committed by Gregory Nutt
parent 4f22af9547
commit a626ba5b70
4 changed files with 80 additions and 0 deletions
+4
View File
@@ -214,6 +214,10 @@ FAR char *ctime_r(FAR const time_t *timep, FAR char *buf);
time_t time(FAR time_t *timep);
#if defined(CONFIG_LIBC_DIFFTIME)
double difftime(time_t time1, time_t time0);
#endif
int timer_create(clockid_t clockid, FAR struct sigevent *evp,
FAR timer_t *timerid);
int timer_delete(timer_t timerid);