From a471e73adf419b59cd8232745210e96a8fff773b Mon Sep 17 00:00:00 2001 From: Henning Nielsen Lund Date: Sat, 5 Aug 2017 17:28:39 +0200 Subject: [PATCH] add timespec declaration --- library/include/time.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/library/include/time.h b/library/include/time.h index 065beae..09b5636 100644 --- a/library/include/time.h +++ b/library/include/time.h @@ -106,6 +106,19 @@ extern size_t strftime(char *s, size_t maxsize, const char *format, /****************************************************************************/ +/* Timespec declaration */ +struct timespec +{ + time_t tv_secs; + long tv_nsec; +}; + +#ifndef tv_sec +#define tv_sec tv_secs +#endif /* tv_sec */ + +/****************************************************************************/ + extern char * asctime_r(const struct tm *tm,char * buffer); extern char * ctime_r(const time_t *tptr,char * buffer); extern struct tm * gmtime_r(const time_t *t,struct tm * tm_ptr);