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