130583Sbostic /* 237102Sbostic * Copyright (c) 1989 The Regents of the University of California. 337102Sbostic * All rights reserved. 430583Sbostic * 542617Sbostic * %sccs.include.redist.c% 637102Sbostic * 7*45832Sbostic * @(#)time.h 5.8 (Berkeley) 12/18/90 830583Sbostic */ 918330Smckusick 10*45832Sbostic #include <machine/types.h> 1140486Smckusick 1243492Sbostic #ifndef NULL 1343492Sbostic #define NULL 0 1443492Sbostic #endif 1543492Sbostic 1643492Sbostic #ifdef _CLOCK_T_ 1743492Sbostic typedef _CLOCK_T_ clock_t; 1843492Sbostic #undef _CLOCK_T_ 1943492Sbostic #endif 2043492Sbostic 2143492Sbostic #ifdef _TIME_T_ 2243492Sbostic typedef _TIME_T_ time_t; 2343492Sbostic #undef _TIME_T_ 2443492Sbostic #endif 2543492Sbostic 2643492Sbostic #ifdef _SIZE_T_ 2743492Sbostic typedef _SIZE_T_ size_t; 2843492Sbostic #undef _SIZE_T_ 2943492Sbostic #endif 3043492Sbostic 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 *); 5045142Sbostic extern clock_t clock(void); 5140323Sbostic extern double difftime(const time_t, const time_t); 5240323Sbostic extern char *asctime(const struct tm *); 5340323Sbostic extern char *ctime(const time_t *); 5440323Sbostic extern char *timezone(int , int); 5540323Sbostic extern void tzset(void); 5640323Sbostic extern void tzsetwall(void); 5740323Sbostic #else 5840323Sbostic extern struct tm *gmtime(); 5940323Sbostic extern struct tm *localtime(); 6045142Sbostic extern clock_t clock(); 6140323Sbostic extern time_t mktime(); 6240323Sbostic extern time_t time(); 6340323Sbostic extern double difftime(); 6440323Sbostic extern char *asctime(); 6540323Sbostic extern char *ctime(); 6640323Sbostic extern char *timezone(); 6740323Sbostic extern void tzset(); 6840323Sbostic extern void tzsetwall(); 6940323Sbostic #endif 70