xref: /csrg-svn/include/time.h (revision 43492)
130583Sbostic /*
237102Sbostic  * Copyright (c) 1989 The Regents of the University of California.
337102Sbostic  * All rights reserved.
430583Sbostic  *
542617Sbostic  * %sccs.include.redist.c%
637102Sbostic  *
7*43492Sbostic  *	@(#)time.h	5.6 (Berkeley) 06/23/90
830583Sbostic  */
918330Smckusick 
10*43492Sbostic #include <machine/machtypes.h>
1140486Smckusick 
12*43492Sbostic #ifndef	NULL
13*43492Sbostic #define	NULL	0
14*43492Sbostic #endif
15*43492Sbostic 
16*43492Sbostic #ifdef	_CLOCK_T_
17*43492Sbostic typedef	_CLOCK_T_	clock_t;
18*43492Sbostic #undef	_CLOCK_T_
19*43492Sbostic #endif
20*43492Sbostic 
21*43492Sbostic #ifdef	_TIME_T_
22*43492Sbostic typedef	_TIME_T_	time_t;
23*43492Sbostic #undef	_TIME_T_
24*43492Sbostic #endif
25*43492Sbostic 
26*43492Sbostic #ifdef	_SIZE_T_
27*43492Sbostic typedef	_SIZE_T_	size_t;
28*43492Sbostic #undef	_SIZE_T_
29*43492Sbostic #endif
30*43492Sbostic 
3118330Smckusick struct tm {
3237102Sbostic 	int	tm_sec;		/* seconds after the minute [0-60] */
3337102Sbostic 	int	tm_min;		/* minutes after the hour [0-59] */
3437102Sbostic 	int	tm_hour;	/* hours since midnight [0-23] */
3537102Sbostic 	int	tm_mday;	/* day of the month [1-31] */
3637102Sbostic 	int	tm_mon;		/* months since January [0-11] */
3737102Sbostic 	int	tm_year;	/* years since 1900 */
3837102Sbostic 	int	tm_wday;	/* days since Sunday [0-6] */
3937102Sbostic 	int	tm_yday;	/* days since January 1 [0-365] */
4037102Sbostic 	int	tm_isdst;	/* Daylight Savings Time flag */
4137102Sbostic 	long	tm_gmtoff;	/* offset from CUT in seconds */
4237102Sbostic 	char	*tm_zone;	/* timezone abbreviation */
4318330Smckusick };
4418330Smckusick 
4543491Sbostic #if __STDC__ || c_plusplus
4640323Sbostic extern struct tm *gmtime(const time_t *);
4740323Sbostic extern struct tm *localtime(const time_t *);
4840323Sbostic extern time_t mktime(const struct tm *);
4940323Sbostic extern time_t time(time_t *);
5040323Sbostic extern double difftime(const time_t, const time_t);
5140323Sbostic extern char *asctime(const struct tm *);
5240323Sbostic extern char *ctime(const time_t *);
5340323Sbostic extern char *timezone(int , int);
5440323Sbostic extern void tzset(void);
5540323Sbostic extern void tzsetwall(void);
5640323Sbostic #else
5740323Sbostic extern struct tm *gmtime();
5840323Sbostic extern struct tm *localtime();
5940323Sbostic extern time_t mktime();
6040323Sbostic extern time_t time();
6140323Sbostic extern double difftime();
6240323Sbostic extern char *asctime();
6340323Sbostic extern char *ctime();
6440323Sbostic extern char *timezone();
6540323Sbostic extern void tzset();
6640323Sbostic extern void tzsetwall();
6740323Sbostic #endif
68