diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-07-12 15:16:00 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-07-12 15:16:00 +0000 |
commit | 2c0b1a2f8d2294ff3486ba04752cd1bd4b3e279c (patch) | |
tree | 44bb9f30de044b53805bb77ca5df5b706ea504ad /nuttx/include/time.h | |
parent | 32498f8db8a4194609e334ea95b3de569bd92784 (diff) | |
download | px4-nuttx-2c0b1a2f8d2294ff3486ba04752cd1bd4b3e279c.tar.gz px4-nuttx-2c0b1a2f8d2294ff3486ba04752cd1bd4b3e279c.tar.bz2 px4-nuttx-2c0b1a2f8d2294ff3486ba04752cd1bd4b3e279c.zip |
Add strftime
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1977 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/time.h')
-rw-r--r-- | nuttx/include/time.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nuttx/include/time.h b/nuttx/include/time.h index ce18c1350..bffde1041 100644 --- a/nuttx/include/time.h +++ b/nuttx/include/time.h @@ -73,6 +73,11 @@ #define TIMER_ABSTIME 1 +/* Local time is the same as gmtime in this implementation */ + +#define localtime(c) gmtime(c) +#define localtime_r(c,r) gmtime_r(c,r) + /******************************************************************************** * Global Type Declarations ********************************************************************************/ @@ -142,12 +147,10 @@ EXTERN int clock_settime(clockid_t clockid, const struct timespec *tp); EXTERN int clock_gettime(clockid_t clockid, struct timespec *tp); EXTERN int clock_getres(clockid_t clockid, struct timespec *res); -EXTERN time_t mktime(struct tm *tp); +EXTERN time_t mktime(const struct tm *tp); EXTERN struct tm *gmtime(const time_t *clock); EXTERN struct tm *gmtime_r(const time_t *clock, struct tm *result); - -#define localtime(c) gmtime(c) -#define localtime_r(c,r) gmtime_r(c,r) +EXTERN size_t strftime(char *s, size_t max, const char *format, const struct tm *tm); EXTERN int timer_create(clockid_t clockid, FAR struct sigevent *evp, FAR timer_t *timerid); EXTERN int timer_delete(timer_t timerid); |