home *** CD-ROM | disk | FTP | other *** search
- /*
- * time.h -- ANSI
- *
- * Functions, types, and a macro for manipulating
- * representations of time.
- *
- * Copyright (c) 1990, MetaWare Incorporated
- */
-
- #ifndef _TIME_H
- #define _TIME_H
- #pragma push_align_members(64);
-
- #ifdef __CPLUSPLUS__
- extern "C" {
- #endif
-
- #ifndef NULL
- #define NULL ((void *)0)
- #endif
-
- #if _AIX || _SUN || _VAX || _SOL
- # define CLOCKS_PER_SEC 60 /*Formerly CLK_TCK in previous ANSI drafts*/
- #elif _ATT && _MC68 /*HP 9000 */
- # define CLOCKS_PER_SEC 50 /*This may not be true for all models!*/
- #elif _MSDOS || _HOB
- # define CLOCKS_PER_SEC 100
- #elif (_ATT || _ATT4) && _I386
- # define CLOCKS_PER_SEC 100
- #elif (_ATT || ATT4) && _I860
- # define CLOCKS_PER_SEC 100 /* Assumes clock_period=53330 in kernel.cfg. */
- #elif (_NEXT)
- # define CLOCKS_PER_SEC 64
- #else
- # define CLOCKS_PER_SEC 1000 /*Formerly CLK_TCK in previous ANSI drafts*/
- #endif
-
- #ifndef _SIZET_H
- #include <sizet.h>
- #endif
-
- #if _IBMESA
- typedef int clock_t;
- #else
- typedef long int clock_t;
- #endif
- typedef long int time_t;
-
- struct tm {
- int tm_sec; /*seconds after the minute- 0..59*/
- int tm_min; /*minutes after the hour- 0..59*/
- int tm_hour; /*hours since midnight- 0..23*/
- int tm_mday; /*day of the month- 1..31*/
- int tm_mon; /*month of the year- 0..11*/
- int tm_year; /*years since 1900*/
- int tm_wday; /*days since Sunday- 0..6*/
- int tm_yday; /*day of the year- 0..365*/
- int tm_isdst; /*daylight savings time- boolean (0,1,-1)*/
- };
-
- /* Time manipulation functions */
- extern clock_t clock(void);
- extern double difftime(time_t __time1,time_t __time0);
- extern time_t mktime(struct tm *__timeptr);
- extern time_t time(time_t *__timer);
-
- /* Time conversion functions */
- extern char * asctime(const struct tm *__timeptr);
- extern char * ctime(const time_t *__timer);
- extern struct tm * gmtime(const time_t *__timer);
- extern struct tm * localtime(const time_t *__timer);
- extern size_t strftime(char *__s, size_t __maxsize,
- const char *__format, const struct tm *__timeptr);
- #ifndef _MSDOS
- extern struct tm *_localtime( const time_t *__timer, struct tm *__tmbuf );
- extern char *_asctime( const struct tm *__timeptr, char *__buf );
- extern char *_ctime( const time_t *__timer, char *__buf );
- extern struct tm *_gmtime( const time_t *__timer, struct tm *__tmbuf );
- #endif
-
- extern int _daylight;
- extern long _timezone;
- extern char *_tzname[2];
- extern void _tzset(void);
-
- extern long _timezone_std;
- extern long _timezone_dst;
- #define _TZNAME_MAX 32
-
- #if __HIGHC__ && (_MSDOS || _HOBBIT)
- extern void tzset(void);
- extern int daylight;
- extern long timezone;
- extern char * tzname[2];
- #endif /* __HIGHC__ */
-
- #if _MSDOS
- extern char * _strdate(char *);
- extern char * _strtime(char *);
- #endif /* _MSDOS */
-
- #ifdef __CPLUSPLUS__
- }
- #endif
- #pragma pop_align_members();
- #endif /*_TIME_H */
-