1 #ifndef _LINUX_TIME_H
2 #define _LINUX_TIME_H
3
4 struct timeval {
5 long tv_sec;
6 long tv_usec;
7 };
8
9 struct timezone {
10 int tz_minuteswest;
11 int tz_dsttime;
12 };
13
14 #define NFDBITS __NFDBITS
15
16 #ifdef __KERNEL__
17 void do_gettimeofday(struct timeval *tv);
18 #include <asm/bitops.h>
19 #include <linux/string.h>
20 #define FD_SETSIZE __FD_SETSIZE
21 #define FD_SET(fd,fdsetp) set_bit(fd,fdsetp)
22 #define FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp)
23 #define FD_ISSET(fd,fdsetp) (0 != test_bit(fd,fdsetp))
24 #define FD_ZERO(fdsetp) memset(fdsetp, 0, sizeof(struct fd_set))
25 #else
26 #define FD_SETSIZE __FD_SETSIZE
27 #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp)
28 #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp)
29 #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)
30 #define FD_ZERO(fdsetp) __FD_ZERO(fdsetp)
31 #endif
32
33
34
35
36
37 #define ITIMER_REAL 0
38 #define ITIMER_VIRTUAL 1
39 #define ITIMER_PROF 2
40
41 struct itimerval {
42 struct timeval it_interval;
43 struct timeval it_value;
44 };
45
46 #endif