libc/time: Add C23 timespec_getres() and timegm()
Commit Message
Add also TIME_MONOTONIC. These interfaces are defined in the C23
standard.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
newlib/libc/include/time.h | 5 +++++
1 file changed, 5 insertions(+)
@@ -62,6 +62,11 @@ time_t time (time_t *_timer);
int timespec_get(struct timespec *ts, int base);
#endif
+#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 2023
+#define TIME_MONOTONIC 2
+int timespec_getres(struct timespec *, int);
+time_t timegm(struct tm * const);
+#endif
#ifndef _REENT_ONLY
char *asctime (const struct tm *_tblock);
char *ctime (const time_t *_time);