| 1 | /* |
| 2 | * Copyright (c) 1989 The Regents of the University of California. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * %sccs.include.redist.c% |
| 6 | * |
| 7 | * @(#)time.h 5.6 (Berkeley) %G% |
| 8 | */ |
| 9 | |
| 10 | #include <machine/machtypes.h> |
| 11 | |
| 12 | #ifndef NULL |
| 13 | #define NULL 0 |
| 14 | #endif |
| 15 | |
| 16 | #ifdef _CLOCK_T_ |
| 17 | typedef _CLOCK_T_ clock_t; |
| 18 | #undef _CLOCK_T_ |
| 19 | #endif |
| 20 | |
| 21 | #ifdef _TIME_T_ |
| 22 | typedef _TIME_T_ time_t; |
| 23 | #undef _TIME_T_ |
| 24 | #endif |
| 25 | |
| 26 | #ifdef _SIZE_T_ |
| 27 | typedef _SIZE_T_ size_t; |
| 28 | #undef _SIZE_T_ |
| 29 | #endif |
| 30 | |
| 31 | struct tm { |
| 32 | int tm_sec; /* seconds after the minute [0-60] */ |
| 33 | int tm_min; /* minutes after the hour [0-59] */ |
| 34 | int tm_hour; /* hours since midnight [0-23] */ |
| 35 | int tm_mday; /* day of the month [1-31] */ |
| 36 | int tm_mon; /* months since January [0-11] */ |
| 37 | int tm_year; /* years since 1900 */ |
| 38 | int tm_wday; /* days since Sunday [0-6] */ |
| 39 | int tm_yday; /* days since January 1 [0-365] */ |
| 40 | int tm_isdst; /* Daylight Savings Time flag */ |
| 41 | long tm_gmtoff; /* offset from CUT in seconds */ |
| 42 | char *tm_zone; /* timezone abbreviation */ |
| 43 | }; |
| 44 | |
| 45 | #if __STDC__ || c_plusplus |
| 46 | extern struct tm *gmtime(const time_t *); |
| 47 | extern struct tm *localtime(const time_t *); |
| 48 | extern time_t mktime(const struct tm *); |
| 49 | extern time_t time(time_t *); |
| 50 | extern double difftime(const time_t, const time_t); |
| 51 | extern char *asctime(const struct tm *); |
| 52 | extern char *ctime(const time_t *); |
| 53 | extern char *timezone(int , int); |
| 54 | extern void tzset(void); |
| 55 | extern void tzsetwall(void); |
| 56 | #else |
| 57 | extern struct tm *gmtime(); |
| 58 | extern struct tm *localtime(); |
| 59 | extern time_t mktime(); |
| 60 | extern time_t time(); |
| 61 | extern double difftime(); |
| 62 | extern char *asctime(); |
| 63 | extern char *ctime(); |
| 64 | extern char *timezone(); |
| 65 | extern void tzset(); |
| 66 | extern void tzsetwall(); |
| 67 | #endif |