github.com/gotranspile/cxgo@v0.3.8-0.20240118201721-29871598a6a2/libs/includes/time.h (about) 1 #include <sys/types.h> 2 3 const _cxgo_go_int CLOCK_REALTIME = 0; 4 const _cxgo_go_int CLOCK_MONOTONIC = 1; 5 const _cxgo_go_int CLOCKS_PER_SEC = 1000000; 6 7 typedef _cxgo_int32 time_t; 8 typedef _cxgo_uint32 timer_t; 9 typedef _cxgo_int32 clock_t; 10 typedef _cxgo_uint32 clockid_t; 11 #define suseconds_t _cxgo_int64 12 13 struct tm { 14 _cxgo_int32 tm_sec; 15 _cxgo_int32 tm_min; 16 _cxgo_int32 tm_hour; 17 _cxgo_int32 tm_mday; 18 _cxgo_int32 tm_mon; 19 _cxgo_int32 tm_year; 20 _cxgo_int32 tm_wday; 21 _cxgo_int32 tm_yday; 22 _cxgo_int32 tm_isdst; 23 void* tm_zone; 24 _cxgo_int32 tm_gmtoff; 25 }; 26 struct timeval { 27 time_t tv_sec; 28 _cxgo_int64 tv_usec; 29 }; 30 struct timespec { 31 time_t tv_sec; 32 _cxgo_int64 tv_nsec; 33 }; 34 35 char *asctime(const struct tm *); 36 char *asctime_r(const struct tm *, char *); 37 clock_t clock(void); 38 _cxgo_int32 clock_getres(clockid_t, struct timespec *); 39 _cxgo_int32 clock_gettime(clockid_t, struct timespec *); 40 _cxgo_int32 clock_settime(clockid_t, const struct timespec *); 41 char *ctime(const time_t *); 42 char *ctime_r(const time_t *, char *); 43 double difftime(time_t, time_t); 44 struct tm *getdate(const char *); 45 struct tm *gmtime(const time_t *); 46 struct tm *gmtime_r(const time_t *, struct tm *); 47 struct tm *localtime(const time_t *); 48 struct tm *localtime_r(const time_t *, struct tm *); 49 time_t mktime(struct tm *); 50 int nanosleep(const struct timespec *, struct timespec *); 51 size_t strftime(char *, size_t, const char *, const struct tm *); 52 char *strptime(const char *, const char *, struct tm *); 53 time_t time(time_t *); 54 int timer_create(clockid_t, struct sigevent *, timer_t *); 55 int timer_delete(timer_t); 56 int timer_gettime(timer_t, struct itimerspec *); 57 int timer_getoverrun(timer_t); 58 int timer_settime(timer_t, int, const struct itimerspec *, struct itimerspec *); 59 void tzset(void);