xref: /csrg-svn/include/time.h (revision 46560)
130583Sbostic /*
237102Sbostic  * Copyright (c) 1989 The Regents of the University of California.
337102Sbostic  * All rights reserved.
430583Sbostic  *
542617Sbostic  * %sccs.include.redist.c%
637102Sbostic  *
7*46560Sdonn  *	@(#)time.h	5.11 (Berkeley) 02/22/91
830583Sbostic  */
918330Smckusick 
1046281Sbostic #ifndef _TIME_H_
1146281Sbostic #define	_TIME_H_
1246281Sbostic 
1345832Sbostic #include <machine/types.h>
1440486Smckusick 
1543492Sbostic #ifndef	NULL
1643492Sbostic #define	NULL	0
1743492Sbostic #endif
1843492Sbostic 
1943492Sbostic #ifdef	_CLOCK_T_
2043492Sbostic typedef	_CLOCK_T_	clock_t;
2143492Sbostic #undef	_CLOCK_T_
2243492Sbostic #endif
2343492Sbostic 
2443492Sbostic #ifdef	_TIME_T_
2543492Sbostic typedef	_TIME_T_	time_t;
2643492Sbostic #undef	_TIME_T_
2743492Sbostic #endif
2843492Sbostic 
2943492Sbostic #ifdef	_SIZE_T_
3043492Sbostic typedef	_SIZE_T_	size_t;
3143492Sbostic #undef	_SIZE_T_
3243492Sbostic #endif
3343492Sbostic 
3418330Smckusick struct tm {
3537102Sbostic 	int	tm_sec;		/* seconds after the minute [0-60] */
3637102Sbostic 	int	tm_min;		/* minutes after the hour [0-59] */
3737102Sbostic 	int	tm_hour;	/* hours since midnight [0-23] */
3837102Sbostic 	int	tm_mday;	/* day of the month [1-31] */
3937102Sbostic 	int	tm_mon;		/* months since January [0-11] */
4037102Sbostic 	int	tm_year;	/* years since 1900 */
4137102Sbostic 	int	tm_wday;	/* days since Sunday [0-6] */
4237102Sbostic 	int	tm_yday;	/* days since January 1 [0-365] */
4337102Sbostic 	int	tm_isdst;	/* Daylight Savings Time flag */
4437102Sbostic 	long	tm_gmtoff;	/* offset from CUT in seconds */
4537102Sbostic 	char	*tm_zone;	/* timezone abbreviation */
4618330Smckusick };
4718330Smckusick 
4846281Sbostic #include <sys/cdefs.h>
4946281Sbostic 
5046281Sbostic __BEGIN_DECLS
5146515Sdonn char *asctime __P((const struct tm *));
5246515Sdonn clock_t clock __P((void));
5346515Sdonn char *ctime __P((const time_t *));
54*46560Sdonn double difftime __P((time_t, time_t));
5546281Sbostic struct tm *gmtime __P((const time_t *));
5646281Sbostic struct tm *localtime __P((const time_t *));
57*46560Sdonn time_t mktime __P((struct tm *));
5846515Sdonn size_t strftime __P((char *, size_t, const char *, const struct tm *));
5946281Sbostic time_t time __P((time_t *));
6046515Sdonn 
6146515Sdonn #ifndef _ANSI_SOURCE
6246281Sbostic void tzset __P((void));
6346515Sdonn #endif /* not ANSI */
6446515Sdonn 
6546515Sdonn #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
6646515Sdonn char *timezone __P((int, int));
6746281Sbostic void tzsetwall __P((void));
6846515Sdonn #endif /* neither ANSI nor POSIX */
6946281Sbostic __END_DECLS
7046281Sbostic 
7146281Sbostic #endif /* !_TIME_H_ */
72