home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK4 / INCLUDE / TIME.H$ / TIME
Encoding:
Text File  |  1991-11-06  |  2.8 KB  |  126 lines

  1. /***
  2. *time.h - definitions/declarations for time routines
  3. *
  4. *    Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *    This file contains the various declarations and definitions
  8. *    for the time routines.
  9. *    [ANSI/System V]
  10. *
  11. ****/
  12.  
  13. #ifndef _INC_TIME
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. #if (_MSC_VER <= 600)
  20. #define __cdecl     _cdecl
  21. #define __far       _far
  22. #define __near      _near
  23. #define __pascal    _pascal
  24. #endif
  25.  
  26. /* implementation defined time types */
  27.  
  28. #ifndef _TIME_T_DEFINED
  29. typedef unsigned long time_t;
  30. #define _TIME_T_DEFINED
  31. #endif
  32.  
  33. #ifndef _CLOCK_T_DEFINED
  34. typedef long clock_t;
  35. #define _CLOCK_T_DEFINED
  36. #endif
  37.  
  38. #ifndef _SIZE_T_DEFINED
  39. typedef unsigned int size_t;
  40. #define _SIZE_T_DEFINED
  41. #endif
  42.  
  43. /* structure for use with localtime(), gmtime(), etc. */
  44.  
  45. #ifndef _TM_DEFINED
  46. struct tm {
  47.     int tm_sec;    /* seconds after the minute - [0,59] */
  48.     int tm_min;    /* minutes after the hour - [0,59] */
  49.     int tm_hour;    /* hours since midnight - [0,23] */
  50.     int tm_mday;    /* day of the month - [1,31] */
  51.     int tm_mon;    /* months since January - [0,11] */
  52.     int tm_year;    /* years since 1900 */
  53.     int tm_wday;    /* days since Sunday - [0,6] */
  54.     int tm_yday;    /* days since January 1 - [0,365] */
  55.     int tm_isdst;    /* daylight savings time flag */
  56.     };
  57. #define _TM_DEFINED
  58. #endif
  59.  
  60.  
  61. /* define NULL pointer value */
  62.  
  63. #ifndef NULL
  64. #ifdef __cplusplus
  65. #define NULL    0
  66. #else
  67. #define NULL    ((void *)0)
  68. #endif
  69. #endif
  70.  
  71.  
  72. /* clock ticks macro - ANSI version */
  73.  
  74. #define CLOCKS_PER_SEC    1000
  75.  
  76.  
  77. /* extern declarations for the global variables used by the ctime family of
  78.  * routines.
  79.  */
  80.  
  81. extern int __near __cdecl _daylight;    /* non-zero if daylight savings time is used */
  82. extern long __near __cdecl _timezone;    /* difference in seconds between GMT and local time */
  83. extern char * __near __cdecl _tzname[2];/* standard/daylight savings time zone names */
  84.  
  85.  
  86. /* function prototypes */
  87.  
  88. double __cdecl difftime(time_t, time_t);
  89.  
  90. char * __cdecl asctime(const struct tm *);
  91. char * __cdecl ctime(const time_t *);
  92. #ifndef _WINDLL
  93. clock_t __cdecl clock(void);
  94. #endif
  95. struct tm * __cdecl gmtime(const time_t *);
  96. struct tm * __cdecl localtime(const time_t *);
  97. time_t __cdecl mktime(struct tm *);
  98. #ifndef _WINDLL
  99. size_t __cdecl strftime(char *, size_t, const char *,
  100.     const struct tm *);
  101. #endif
  102. char * __cdecl _strdate(char *);
  103. char * __cdecl _strtime(char *);
  104. time_t __cdecl time(time_t *);
  105. void __cdecl _tzset(void);
  106.  
  107. #ifndef __STDC__
  108. /* Non-ANSI names for compatibility */
  109.  
  110. #define CLK_TCK  CLOCKS_PER_SEC
  111.  
  112. extern int __near __cdecl daylight;
  113. extern long __near __cdecl timezone;
  114. extern char * __near __cdecl tzname[2];
  115.  
  116. void __cdecl tzset(void);
  117.  
  118. #endif    /* __STDC__ */
  119.  
  120. #ifdef __cplusplus
  121. }
  122. #endif
  123.  
  124. #define _INC_TIME
  125. #endif    /* _INC_TIME */
  126.