date and time created 90/06/25 13:56:22 by bostic
[unix-history] / usr / src / include / time.h
... / ...
CommitLineData
1/*
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
7 * @(#)time.h 5.6 (Berkeley) %G%
8 */
9
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
30
31struct tm {
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 */
43};
44
45#if __STDC__ || c_plusplus
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