Annotation of prex-old/usr/include/time.h, Revision 1.1.1.1
1.1 nbrk 1: /*
2: * Copyright (c) 1989, 1993
3: * The Regents of the University of California. All rights reserved.
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.
9: *
10: * Redistribution and use in source and binary forms, with or without
11: * modification, are permitted provided that the following conditions
12: * are met:
13: * 1. Redistributions of source code must retain the above copyright
14: * notice, this list of conditions and the following disclaimer.
15: * 2. Redistributions in binary form must reproduce the above copyright
16: * notice, this list of conditions and the following disclaimer in the
17: * documentation and/or other materials provided with the distribution.
18: * 3. Neither the name of the University nor the names of its contributors
19: * may be used to endorse or promote products derived from this software
20: * without specific prior written permission.
21: *
22: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32: * SUCH DAMAGE.
33: *
34: * @(#)time.h 8.3 (Berkeley) 1/21/94
35: */
36:
37: #ifndef _TIME_H_
38: #define _TIME_H_
39:
40: #include <sys/param.h>
41:
42: #include <machine/ansi.h>
43:
44: #ifndef NULL
45: #define NULL 0
46: #endif
47:
48: #ifdef _BSD_CLOCK_T_
49: typedef _BSD_CLOCK_T_ clock_t;
50: #undef _BSD_CLOCK_T_
51: #endif
52:
53: #ifdef _BSD_TIME_T_
54: typedef _BSD_TIME_T_ time_t;
55: #undef _BSD_TIME_T_
56: #endif
57:
58: #ifdef _BSD_SIZE_T_
59: typedef _BSD_SIZE_T_ size_t;
60: #undef _BSD_SIZE_T_
61: #endif
62:
63: struct tm {
64: int tm_sec; /* seconds after the minute [0-60] */
65: int tm_min; /* minutes after the hour [0-59] */
66: int tm_hour; /* hours since midnight [0-23] */
67: int tm_mday; /* day of the month [1-31] */
68: int tm_mon; /* months since January [0-11] */
69: int tm_year; /* years since 1900 */
70: int tm_wday; /* days since Sunday [0-6] */
71: int tm_yday; /* days since January 1 [0-365] */
72: int tm_isdst; /* Daylight Savings Time flag */
73: };
74:
75: #define CLK_TCK HZ /* ticks per second */
76: #define CLOCKS_PER_SEC HZ /* same with CLK_TCK */
77:
78:
79: #include <sys/cdefs.h>
80:
81: __BEGIN_DECLS
82: char *asctime(const struct tm *);
83: clock_t clock(void);
84: char *ctime(const time_t *);
85: double difftime(time_t, time_t);
86: struct tm *gmtime(const time_t *);
87: struct tm *localtime(const time_t *);
88: time_t mktime(struct tm *);
89: size_t strftime(char *, size_t, const char *, const struct tm *);
90: time_t time(time_t *);
91:
92: char *asctime_r(const struct tm *, char *);
93: struct tm *gmtime_r(const time_t *, struct tm *);
94: struct tm *localtime_r(const time_t *, struct tm *);
95:
96: #ifndef _ANSI_SOURCE
97: void tzset(void);
98: #endif /* not ANSI */
99:
100: #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
101: char *timezone(int, int);
102: void tzsetwall(void);
103: #endif /* neither ANSI nor POSIX */
104: __END_DECLS
105:
106: #endif /* !_TIME_H_ */
CVSweb