xref: /titanic_51/usr/src/lib/libast/common/features/time (revision f657cd55755084dade71fb0c1d9f51994c226a70)
1set	prototyped
2lib	nanosleep,usleep,_strftime
3typ	clock_t = uint32_t
4typ	time_t = uint32_t
5
6if sys time {
7	#include <sys/time.h>
8}
9endif
10
11if ! mem tm.tm_sec sys/time.h
12    if hdr time {
13	#include <time.h>
14    }
15    endif
16endif
17
18if sys times {
19	#include <sys/times.h>
20}
21else {
22	struct tms
23	{
24		clock_t	tms_utime;
25		clock_t	tms_stime;
26		clock_t	tms_cutime;
27		clock_t	tms_cstime;
28	};
29	extern clock_t		times(struct tms*);
30}
31endif
32
33if ! mem timeval.tv_sec sys/time.h {
34	struct timeval
35	{
36		time_t	tv_sec;
37		time_t	tv_usec;
38	};
39}
40endif
41
42cat{
43#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
44#define CLOCKS_PER_SEC	CLK_TCK
45#endif
46}end
47