|
|
1.1 ! root 1: /* time.h 6.1 83/07/29 */ ! 2: ! 3: /* ! 4: * Structure returned by gettimeofday(2) system call, ! 5: * and used in other calls. ! 6: */ ! 7: struct timeval { ! 8: long tv_sec; /* seconds */ ! 9: long tv_usec; /* and microseconds */ ! 10: }; ! 11: ! 12: struct timezone { ! 13: int tz_minuteswest; /* minutes west of Greenwich */ ! 14: int tz_dsttime; /* type of dst correction */ ! 15: }; ! 16: #define DST_NONE 0 /* not on dst */ ! 17: #define DST_USA 1 /* USA style dst */ ! 18: #define DST_AUST 2 /* Australian style dst */ ! 19: #define DST_WET 3 /* Western European dst */ ! 20: #define DST_MET 4 /* Middle European dst */ ! 21: #define DST_EET 5 /* Eastern European dst */ ! 22: ! 23: /* ! 24: * Operations on timevals. ! 25: * ! 26: * NB: timercmp does not work for >= or <=. ! 27: */ ! 28: #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) ! 29: #define timercmp(tvp, uvp, cmp) \ ! 30: ((tvp)->tv_sec cmp (uvp)->tv_sec || \ ! 31: (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) ! 32: #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 ! 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 itimerval { ! 43: struct timeval it_interval; /* timer interval */ ! 44: struct timeval it_value; /* current value */ ! 45: }; ! 46: ! 47: /* ! 48: * Structure returned by gmtime and localtime calls (see ctime(3)). ! 49: */ ! 50: struct tm { ! 51: int tm_sec; ! 52: int tm_min; ! 53: int tm_hour; ! 54: int tm_mday; ! 55: int tm_mon; ! 56: int tm_year; ! 57: int tm_wday; ! 58: int tm_yday; ! 59: int tm_isdst; ! 60: }; ! 61: ! 62: #ifndef KERNEL ! 63: extern struct tm *gmtime(), *localtime(); ! 64: extern char *asctime(), *ctime(); ! 65: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.