diff options
author | dzwdz | 2022-08-29 13:57:47 +0200 |
---|---|---|
committer | dzwdz | 2022-08-29 13:58:02 +0200 |
commit | 4ae57a7fb13e68c5e6f1c1246a867555dbd986db (patch) | |
tree | 3bee7f7eee21e9f2ed3b9f07dd1671a1c230cf66 /src/user/lib/time.c | |
parent | edb7fc07bf93e4a1883cccf45ad7a4b2cbf390d9 (diff) |
user/lua: implement the bare minimum for it to link and "run"
Diffstat (limited to 'src/user/lib/time.c')
-rw-r--r-- | src/user/lib/time.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/user/lib/time.c b/src/user/lib/time.c new file mode 100644 index 0000000..4709ecd --- /dev/null +++ b/src/user/lib/time.c @@ -0,0 +1,43 @@ +#include <errno.h> +#include <time.h> + +// TODO time +time_t time(time_t *tloc) { + time_t ret = 0; + if (tloc) *tloc = ret; + return ret; +} + +clock_t clock(void) { + return 0; +} + +struct tm *gmtime(const time_t *timer) { + (void)timer; + errno = ENOSYS; + return NULL; +} + +struct tm *localtime(const time_t *timer) { + (void)timer; + errno = ENOSYS; + return NULL; +} + +time_t mktime(struct tm *timeptr) { + (void)timeptr; + return 0; +} + +double difftime(time_t time1, time_t time0) { + (void)time1; (void)time0; + return 0; +} + +size_t strftime( + char *restrict s, size_t maxsize, + const char *restrict format, const struct tm *restrict timeptr) +{ + (void)s; (void)maxsize; (void)format; (void)timeptr; + return 0; +} |