Commit | Line | Data |
---|---|---|
7320c7cd | 1 | /* |
976fe643 KB |
2 | * Copyright (c) 1989 The Regents of the University of California. |
3 | * All rights reserved. | |
7320c7cd | 4 | * |
269a7923 | 5 | * %sccs.include.redist.c% |
976fe643 | 6 | * |
8ad794c8 | 7 | * @(#)time.h 5.6 (Berkeley) %G% |
7320c7cd | 8 | */ |
86d83cf3 | 9 | |
8ad794c8 KB |
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 | |
c403696a | 30 | |
86d83cf3 | 31 | struct tm { |
976fe643 KB |
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 */ | |
86d83cf3 KM |
43 | }; |
44 | ||
be93263e | 45 | #if __STDC__ || c_plusplus |
e7ce7d7c KB |
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 |