date and time created 90/06/25 13:56:22 by bostic
[unix-history] / usr / src / include / time.h
CommitLineData
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_
17typedef _CLOCK_T_ clock_t;
18#undef _CLOCK_T_
19#endif
20
21#ifdef _TIME_T_
22typedef _TIME_T_ time_t;
23#undef _TIME_T_
24#endif
25
26#ifdef _SIZE_T_
27typedef _SIZE_T_ size_t;
28#undef _SIZE_T_
29#endif
c403696a 30
86d83cf3 31struct 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
46extern struct tm *gmtime(const time_t *);
47extern struct tm *localtime(const time_t *);
48extern time_t mktime(const struct tm *);
49extern time_t time(time_t *);
50extern double difftime(const time_t, const time_t);
51extern char *asctime(const struct tm *);
52extern char *ctime(const time_t *);
53extern char *timezone(int , int);
54extern void tzset(void);
55extern void tzsetwall(void);
56#else
57extern struct tm *gmtime();
58extern struct tm *localtime();
59extern time_t mktime();
60extern time_t time();
61extern double difftime();
62extern char *asctime();
63extern char *ctime();
64extern char *timezone();
65extern void tzset();
66extern void tzsetwall();
67#endif