xref: /titanic_44/usr/src/lib/libast/common/features/time (revision 0398691684c2596072212e4ca9d7033ad7ccfa54)
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#ifndef CLOCKS_PER_SEC
44#define CLOCKS_PER_SEC	CLK_TCK
45#endif
46}end
47