Commit | Line | Data |
---|---|---|
7320c7cd | 1 | /* |
d6c17d94 KB |
2 | * Copyright (c) 1989, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
7320c7cd | 4 | * |
269a7923 | 5 | * %sccs.include.redist.c% |
976fe643 | 6 | * |
d6c17d94 | 7 | * @(#)time.h 8.1 (Berkeley) %G% |
7320c7cd | 8 | */ |
86d83cf3 | 9 | |
91befe9c KB |
10 | #ifndef _TIME_H_ |
11 | #define _TIME_H_ | |
12 | ||
6124b236 | 13 | #include <machine/ansi.h> |
8ad794c8 KB |
14 | |
15 | #ifndef NULL | |
16 | #define NULL 0 | |
17 | #endif | |
18 | ||
3d2899e6 KB |
19 | #ifdef _BSD_CLOCK_T_ |
20 | typedef _BSD_CLOCK_T_ clock_t; | |
21 | #undef _BSD_CLOCK_T_ | |
8ad794c8 KB |
22 | #endif |
23 | ||
3d2899e6 KB |
24 | #ifdef _BSD_TIME_T_ |
25 | typedef _BSD_TIME_T_ time_t; | |
26 | #undef _BSD_TIME_T_ | |
8ad794c8 KB |
27 | #endif |
28 | ||
3d2899e6 KB |
29 | #ifdef _BSD_SIZE_T_ |
30 | typedef _BSD_SIZE_T_ size_t; | |
31 | #undef _BSD_SIZE_T_ | |
8ad794c8 | 32 | #endif |
c403696a | 33 | |
86d83cf3 | 34 | struct tm { |
976fe643 KB |
35 | int tm_sec; /* seconds after the minute [0-60] */ |
36 | int tm_min; /* minutes after the hour [0-59] */ | |
37 | int tm_hour; /* hours since midnight [0-23] */ | |
38 | int tm_mday; /* day of the month [1-31] */ | |
39 | int tm_mon; /* months since January [0-11] */ | |
40 | int tm_year; /* years since 1900 */ | |
41 | int tm_wday; /* days since Sunday [0-6] */ | |
42 | int tm_yday; /* days since January 1 [0-365] */ | |
43 | int tm_isdst; /* Daylight Savings Time flag */ | |
44 | long tm_gmtoff; /* offset from CUT in seconds */ | |
45 | char *tm_zone; /* timezone abbreviation */ | |
86d83cf3 KM |
46 | }; |
47 | ||
91befe9c KB |
48 | #include <sys/cdefs.h> |
49 | ||
50 | __BEGIN_DECLS | |
993000f1 DS |
51 | char *asctime __P((const struct tm *)); |
52 | clock_t clock __P((void)); | |
53 | char *ctime __P((const time_t *)); | |
c14af571 | 54 | double difftime __P((time_t, time_t)); |
91befe9c KB |
55 | struct tm *gmtime __P((const time_t *)); |
56 | struct tm *localtime __P((const time_t *)); | |
c14af571 | 57 | time_t mktime __P((struct tm *)); |
993000f1 | 58 | size_t strftime __P((char *, size_t, const char *, const struct tm *)); |
91befe9c | 59 | time_t time __P((time_t *)); |
993000f1 DS |
60 | |
61 | #ifndef _ANSI_SOURCE | |
91befe9c | 62 | void tzset __P((void)); |
993000f1 DS |
63 | #endif /* not ANSI */ |
64 | ||
65 | #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) | |
66 | char *timezone __P((int, int)); | |
91befe9c | 67 | void tzsetwall __P((void)); |
993000f1 | 68 | #endif /* neither ANSI nor POSIX */ |
91befe9c KB |
69 | __END_DECLS |
70 | ||
71 | #endif /* !_TIME_H_ */ |