xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/linux/time.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 #ifndef _LINUX_TIME_H
2 #define _LINUX_TIME_H
3 
4 #include <linux/types.h>
5 
6 
7 #ifndef _STRUCT_TIMESPEC
8 #define _STRUCT_TIMESPEC
9 struct timespec {
10 	time_t	tv_sec;		/* seconds */
11 	long	tv_nsec;	/* nanoseconds */
12 };
13 #endif
14 
15 struct timeval {
16 	time_t		tv_sec;		/* seconds */
17 	suseconds_t	tv_usec;	/* microseconds */
18 };
19 
20 struct timezone {
21 	int	tz_minuteswest;	/* minutes west of Greenwich */
22 	int	tz_dsttime;	/* type of dst correction */
23 };
24 
25 
26 #define NFDBITS			__NFDBITS
27 
28 #define FD_SETSIZE		__FD_SETSIZE
29 #define FD_SET(fd,fdsetp)	__FD_SET(fd,fdsetp)
30 #define FD_CLR(fd,fdsetp)	__FD_CLR(fd,fdsetp)
31 #define FD_ISSET(fd,fdsetp)	__FD_ISSET(fd,fdsetp)
32 #define FD_ZERO(fdsetp)		__FD_ZERO(fdsetp)
33 
34 /*
35  * Names of the interval timers, and structure
36  * defining a timer setting:
37  */
38 #define	ITIMER_REAL		0
39 #define	ITIMER_VIRTUAL		1
40 #define	ITIMER_PROF		2
41 
42 struct itimerspec {
43 	struct timespec it_interval;	/* timer period */
44 	struct timespec it_value;	/* timer expiration */
45 };
46 
47 struct itimerval {
48 	struct timeval it_interval;	/* timer interval */
49 	struct timeval it_value;	/* current value */
50 };
51 
52 /*
53  * The IDs of the various system clocks (for POSIX.1b interval timers):
54  */
55 #define CLOCK_REALTIME			0
56 #define CLOCK_MONOTONIC			1
57 #define CLOCK_PROCESS_CPUTIME_ID	2
58 #define CLOCK_THREAD_CPUTIME_ID		3
59 
60 /*
61  * The IDs of various hardware clocks:
62  */
63 #define CLOCK_SGI_CYCLE			10
64 #define MAX_CLOCKS			16
65 #define CLOCKS_MASK			(CLOCK_REALTIME | CLOCK_MONOTONIC)
66 #define CLOCKS_MONO			CLOCK_MONOTONIC
67 
68 /*
69  * The various flags for setting POSIX.1b interval timers:
70  */
71 #define TIMER_ABSTIME			0x01
72 
73 #endif
74