| 1 |
199 |
simons |
#ifndef _SYS_TIME_H
|
| 2 |
|
|
#define _SYS_TIME_H
|
| 3 |
|
|
|
| 4 |
|
|
#include <features.h>
|
| 5 |
|
|
#include <linux/types.h>
|
| 6 |
|
|
#include <linux/time.h>
|
| 7 |
|
|
|
| 8 |
|
|
#define DST_NONE 0 /* not on dst */
|
| 9 |
|
|
#define DST_USA 1 /* USA style dst */
|
| 10 |
|
|
#define DST_AUST 2 /* Australian style dst */
|
| 11 |
|
|
#define DST_WET 3 /* Western European dst */
|
| 12 |
|
|
#define DST_MET 4 /* Middle European dst */
|
| 13 |
|
|
#define DST_EET 5 /* Eastern European dst */
|
| 14 |
|
|
#define DST_CAN 6 /* Canada */
|
| 15 |
|
|
#define DST_GB 7 /* Great Britain and Eire */
|
| 16 |
|
|
#define DST_RUM 8 /* Rumania */
|
| 17 |
|
|
#define DST_TUR 9 /* Turkey */
|
| 18 |
|
|
#define DST_AUSTALT 10 /* Australian style with shift in 1986 */
|
| 19 |
|
|
|
| 20 |
|
|
#ifdef __SVR4_I386_ABI_L1__
|
| 21 |
|
|
typedef struct timestruc {
|
| 22 |
|
|
time_t tv_sec;
|
| 23 |
|
|
long tv_nsec;
|
| 24 |
|
|
} timestruc_t;
|
| 25 |
|
|
#endif /* __SVR4_I386_ABI_L1__ */
|
| 26 |
|
|
|
| 27 |
|
|
/*
|
| 28 |
|
|
* Operations on timevals.
|
| 29 |
|
|
*
|
| 30 |
|
|
* NB: timercmp does not work for >= or <=.
|
| 31 |
|
|
*
|
| 32 |
|
|
*/
|
| 33 |
|
|
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
|
| 34 |
|
|
#define timercmp(tvp, uvp, cmp) \
|
| 35 |
|
|
(((tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) \
|
| 36 |
|
|
|| (tvp)->tv_sec cmp (uvp)->tv_sec)
|
| 37 |
|
|
#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
|
| 38 |
|
|
|
| 39 |
|
|
#include <time.h>
|
| 40 |
|
|
#include <sys/types.h>
|
| 41 |
|
|
|
| 42 |
|
|
__BEGIN_DECLS
|
| 43 |
|
|
|
| 44 |
|
|
extern int __gettimeofday __P ((struct timeval * __tp,
|
| 45 |
|
|
struct timezone * __tz));
|
| 46 |
|
|
extern int gettimeofday __P ((struct timeval * __tp,
|
| 47 |
|
|
struct timezone * __tz));
|
| 48 |
|
|
extern int __settimeofday __P ((__const struct timeval *__tv,
|
| 49 |
|
|
__const struct timezone *__tz));
|
| 50 |
|
|
extern int settimeofday __P ((__const struct timeval *__tv,
|
| 51 |
|
|
__const struct timezone *__tz));
|
| 52 |
|
|
|
| 53 |
|
|
extern int __select __P ((int __width, fd_set * __readfds,
|
| 54 |
|
|
fd_set * __writefds, fd_set * __exceptfds,
|
| 55 |
|
|
struct timeval * __timeout));
|
| 56 |
|
|
extern int select __P ((int __width, fd_set * __readfds,
|
| 57 |
|
|
fd_set * __writefds, fd_set * __exceptfds,
|
| 58 |
|
|
struct timeval * __timeout));
|
| 59 |
|
|
|
| 60 |
|
|
extern int __getitimer __P ((int __which,
|
| 61 |
|
|
struct itimerval *__value));
|
| 62 |
|
|
extern int getitimer __P ((int __which,
|
| 63 |
|
|
struct itimerval *__value));
|
| 64 |
|
|
extern int __setitimer __P ((int __which,
|
| 65 |
|
|
__const struct itimerval *__value,
|
| 66 |
|
|
struct itimerval *__ovalue));
|
| 67 |
|
|
extern int setitimer __P ((int __which,
|
| 68 |
|
|
__const struct itimerval *__value,
|
| 69 |
|
|
struct itimerval *__ovalue));
|
| 70 |
|
|
|
| 71 |
|
|
extern int __adjtime __P ((struct timeval * __itv,
|
| 72 |
|
|
struct timeval * __otv));
|
| 73 |
|
|
extern int adjtime __P ((struct timeval * __itv,
|
| 74 |
|
|
struct timeval * __otv));
|
| 75 |
|
|
|
| 76 |
|
|
extern int __utimes __P((char *__path, struct timeval *tvp));
|
| 77 |
|
|
extern int utimes __P((char *__path, struct timeval *tvp));
|
| 78 |
|
|
|
| 79 |
|
|
__END_DECLS
|
| 80 |
|
|
|
| 81 |
|
|
#endif /*_SYS_TIME_H*/
|