diff options
Diffstat (limited to 'src/lib/libast/features/time')
-rw-r--r-- | src/lib/libast/features/time | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/lib/libast/features/time b/src/lib/libast/features/time new file mode 100644 index 0000000..6c15113 --- /dev/null +++ b/src/lib/libast/features/time @@ -0,0 +1,46 @@ +set prototyped +lib nanosleep,usleep,_strftime +typ clock_t = uint32_t +typ time_t = uint32_t + +if sys time { + #include <sys/time.h> +} +endif + +if ! mem tm.tm_sec sys/time.h + if hdr time { + #include <time.h> + } + endif +endif + +if sys times { + #include <sys/times.h> +} +else { + struct tms + { + clock_t tms_utime; + clock_t tms_stime; + clock_t tms_cutime; + clock_t tms_cstime; + }; + extern clock_t times(struct tms*); +} +endif + +if ! mem timeval.tv_sec sys/time.h { + struct timeval + { + time_t tv_sec; + time_t tv_usec; + }; +} +endif + +cat{ +#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK) +#define CLOCKS_PER_SEC CLK_TCK +#endif +}end |