| 1 | /* |
| 2 | * Copyright (c) 1989, 1993 |
| 3 | * The Regents of the University of California. All rights reserved. |
| 4 | * |
| 5 | * %sccs.include.redist.c% |
| 6 | * |
| 7 | * @(#)time.h 8.1 (Berkeley) %G% |
| 8 | */ |
| 9 | |
| 10 | #ifndef _TIME_H_ |
| 11 | #define _TIME_H_ |
| 12 | |
| 13 | #include <machine/ansi.h> |
| 14 | |
| 15 | #ifndef NULL |
| 16 | #define NULL 0 |
| 17 | #endif |
| 18 | |
| 19 | #ifdef _BSD_CLOCK_T_ |
| 20 | typedef _BSD_CLOCK_T_ clock_t; |
| 21 | #undef _BSD_CLOCK_T_ |
| 22 | #endif |
| 23 | |
| 24 | #ifdef _BSD_TIME_T_ |
| 25 | typedef _BSD_TIME_T_ time_t; |
| 26 | #undef _BSD_TIME_T_ |
| 27 | #endif |
| 28 | |
| 29 | #ifdef _BSD_SIZE_T_ |
| 30 | typedef _BSD_SIZE_T_ size_t; |
| 31 | #undef _BSD_SIZE_T_ |
| 32 | #endif |
| 33 | |
| 34 | struct tm { |
| 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 */ |
| 46 | }; |
| 47 | |
| 48 | #include <sys/cdefs.h> |
| 49 | |
| 50 | __BEGIN_DECLS |
| 51 | char *asctime __P((const struct tm *)); |
| 52 | clock_t clock __P((void)); |
| 53 | char *ctime __P((const time_t *)); |
| 54 | double difftime __P((time_t, time_t)); |
| 55 | struct tm *gmtime __P((const time_t *)); |
| 56 | struct tm *localtime __P((const time_t *)); |
| 57 | time_t mktime __P((struct tm *)); |
| 58 | size_t strftime __P((char *, size_t, const char *, const struct tm *)); |
| 59 | time_t time __P((time_t *)); |
| 60 | |
| 61 | #ifndef _ANSI_SOURCE |
| 62 | void tzset __P((void)); |
| 63 | #endif /* not ANSI */ |
| 64 | |
| 65 | #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) |
| 66 | char *timezone __P((int, int)); |
| 67 | void tzsetwall __P((void)); |
| 68 | #endif /* neither ANSI nor POSIX */ |
| 69 | __END_DECLS |
| 70 | |
| 71 | #endif /* !_TIME_H_ */ |