diff --git a/inc/time.h b/inc/time.h new file mode 100644 index 0000000..df2442a --- /dev/null +++ b/inc/time.h @@ -0,0 +1,42 @@ +#ifndef _RTLIBC_TIME_H +#define _RTLIBC_TIME_H + + +#include + + +#ifdef __cplusplus +extern "C" +{ +#endif + + +typedef uint64_t time_t; +typedef uint64_t clock_t; + + +struct tm +{ + int32_t tm_sec; + int32_t tm_min; + int32_t tm_hour; + int32_t tm_mday; + int32_t tm_mon; + int32_t tm_year; + int32_t tm_wday; + int32_t tm_yday; + int32_t tm_isdst; +}; + + +clock_t clock(void); + +struct tm* gmtime(const time_t* time); +struct tm* gmtime_r(const time_t* time, struct tm* tms); + +#ifdef __cplusplus +} +#endif + + +#endif