diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
commit | beb116954b9b7f3bb56412b2494b562f02b864b1 (patch) | |
tree | 120e997879884e1b9d93b265221b939d2ef1ade1 /include/linux/time.h | |
parent | 908d4681a1dc3792ecafbe64265783a86c4cccb6 (diff) |
Import of Linux/MIPS 2.1.14
Diffstat (limited to 'include/linux/time.h')
-rw-r--r-- | include/linux/time.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index a6ce36c8c..47246a142 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -1,6 +1,14 @@ #ifndef _LINUX_TIME_H #define _LINUX_TIME_H +#ifndef _STRUCT_TIMESPEC +#define _STRUCT_TIMESPEC +struct timespec { + long tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ +}; +#endif /* _STRUCT_TIMESPEC */ + struct timeval { int tv_sec; /* seconds */ int tv_usec; /* microseconds */ @@ -15,20 +23,16 @@ struct timezone { #ifdef __KERNEL__ void do_gettimeofday(struct timeval *tv); -#include <asm/bitops.h> -#include <linux/string.h> -#define FD_SETSIZE __FD_SETSIZE -#define FD_SET(fd,fdsetp) set_bit(fd,fdsetp) -#define FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp) -#define FD_ISSET(fd,fdsetp) (0 != test_bit(fd,fdsetp)) -#define FD_ZERO(fdsetp) memset(fdsetp, 0, sizeof(struct fd_set)) -#else +void do_settimeofday(struct timeval *tv); +void get_fast_time(struct timeval *tv); +void (*do_get_fast_time)(struct timeval *); +#endif + #define FD_SETSIZE __FD_SETSIZE #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp) #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp) #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO(fdsetp) -#endif /* * Names of the interval timers, and structure @@ -38,6 +42,11 @@ void do_gettimeofday(struct timeval *tv); #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 +struct itimerspec { + struct timespec it_interval; /* timer period */ + struct timespec it_value; /* timer expiration */ +}; + struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ |