diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/sys/time.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/sys/time.c b/common/sys/time.c index 7cf963b3..7a3768c1 100644 --- a/common/sys/time.c +++ b/common/sys/time.c @@ -112,6 +112,20 @@ struct tm *localtime4(const time4_t *t) } } +struct tm* +localtime4_r(const time4_t *t, struct tm *pt) +{ + if (t) + { + time_t temp = (time_t)*t; + localtime_r(&temp, pt); + } + else + localtime_r(NULL, pt); + return pt; +} + + time4_t time4(time4_t *ptr) { if( ptr == NULL ) |