home *** CD-ROM | disk | FTP | other *** search
- /***
- *time.h - definitions/declarations for time routines
- *
- * Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved.
- *
- *Purpose:
- * This file contains the various declarations and definitions
- * for the time routines.
- * [ANSI/System V]
- *
- ****/
-
- #ifndef _INC_TIME
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if defined(_DLL) && !defined(_MT)
- #error Cannot define _DLL without _MT
- #endif
-
- #ifdef _MT
- #define _FAR_ __far
- #else
- #define _FAR_
- #endif
-
- #if (_MSC_VER <= 600)
- #define __cdecl _cdecl
- #define __far _far
- #define __loadds _loadds
- #define __near _near
- #define __pascal _pascal
- #endif
-
- /* implementation defined time types */
-
- #ifndef _TIME_T_DEFINED
- typedef unsigned long time_t;
- #define _TIME_T_DEFINED
- #endif
-
- #ifndef _CLOCK_T_DEFINED
- typedef long clock_t;
- #define _CLOCK_T_DEFINED
- #endif
-
- #ifndef _SIZE_T_DEFINED
- typedef unsigned int size_t;
- #define _SIZE_T_DEFINED
- #endif
-
- /* structure for use with localtime(), gmtime(), etc. */
-
- #ifndef _TM_DEFINED
- 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; /* months since January - [0,11] */
- int tm_year; /* years since 1900 */
- int tm_wday; /* days since Sunday - [0,6] */
- int tm_yday; /* days since January 1 - [0,365] */
- int tm_isdst; /* daylight savings time flag */
- };
- #define _TM_DEFINED
- #endif
-
-
- /* define NULL pointer value */
-
- #ifndef NULL
- #ifdef __cplusplus
- #define NULL 0
- #else
- #define NULL ((void *)0)
- #endif
- #endif
-
-
- /* clock ticks macro - ANSI version */
-
- #define CLOCKS_PER_SEC 1000
-
-
- /* extern declarations for the global variables used by the ctime family of
- * routines.
- */
-
- #ifdef _DLL
- extern int _FAR_ __cdecl _daylight; /* non-zero if daylight savings time is used */
- extern long _FAR_ __cdecl _timezone; /* difference in seconds between GMT and local time */
- extern char _FAR_ * _FAR_ __cdecl _tzname[2];/* standard/daylight savings time zone names */
- #else
- extern int __near __cdecl _daylight; /* non-zero if daylight savings time is used */
- extern long __near __cdecl _timezone; /* difference in seconds between GMT and local time */
- extern char * __near __cdecl _tzname[2];/* standard/daylight savings time zone names */
- #endif
-
-
- /* function prototypes */
-
- #ifdef _MT
- double _FAR_ __pascal difftime(time_t, time_t);
- #else
- double _FAR_ __cdecl difftime(time_t, time_t);
- #endif
-
- char _FAR_ * _FAR_ __cdecl asctime(const struct tm _FAR_ *);
- char _FAR_ * _FAR_ __cdecl ctime(const time_t _FAR_ *);
- #ifndef _WINDLL
- clock_t _FAR_ __cdecl clock(void);
- #endif
- struct tm _FAR_ * _FAR_ __cdecl gmtime(const time_t _FAR_ *);
- struct tm _FAR_ * _FAR_ __cdecl localtime(const time_t _FAR_ *);
- time_t _FAR_ __cdecl mktime(struct tm _FAR_ *);
- #ifndef _WINDLL
- size_t _FAR_ __cdecl strftime(char _FAR_ *, size_t, const char _FAR_ *,
- const struct tm _FAR_ *);
- #endif
- char _FAR_ * _FAR_ __cdecl _strdate(char _FAR_ *);
- char _FAR_ * _FAR_ __cdecl _strtime(char _FAR_ *);
- time_t _FAR_ __cdecl time(time_t _FAR_ *);
- void _FAR_ __cdecl _tzset(void);
-
- #ifndef __STDC__
- /* Non-ANSI names for compatibility */
-
- #define CLK_TCK CLOCKS_PER_SEC
-
- #ifdef _DLL
- extern int _FAR_ __cdecl daylight;
- extern long _FAR_ __cdecl timezone;
- extern char _FAR_ * _FAR_ __cdecl tzname[2];
- #else
- extern int __near __cdecl daylight;
- extern long __near __cdecl timezone;
- extern char * __near __cdecl tzname[2];
- #endif
-
- void _FAR_ __cdecl tzset(void);
-
- #endif /* __STDC__ */
-
- #ifdef __cplusplus
- }
- #endif
-
- #define _INC_TIME
- #endif /* _INC_TIME */
-