home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / TIME.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  2.9 KB  |  122 lines

  1. /*  time.h
  2.  
  3.     Struct and function declarations for dealing with time.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 6.0
  9.  *
  10.  *      Copyright (c) 1987, 1993 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #ifndef __TIME_H
  16. #define __TIME_H
  17.  
  18. #if !defined(___DEFS_H)
  19. #include <_defs.h>
  20. #endif
  21.  
  22. #if !defined(_RC_INVOKED)
  23. #pragma option -a-
  24. #endif
  25.  
  26. #ifndef _SIZE_T
  27. #define _SIZE_T
  28. typedef unsigned size_t;
  29. #endif
  30.  
  31. #ifndef  _TIME_T
  32. #define  _TIME_T
  33. typedef long time_t;
  34. #endif
  35.  
  36. #ifndef  _CLOCK_T
  37. #define  _CLOCK_T
  38. typedef long clock_t;
  39. #endif
  40.  
  41. #define CLOCKS_PER_SEC 1000.0
  42. #define CLK_TCK        1000.0
  43.  
  44. struct tm
  45. {
  46.   int   tm_sec;
  47.   int   tm_min;
  48.   int   tm_hour;
  49.   int   tm_mday;
  50.   int   tm_mon;
  51.   int   tm_year;
  52.   int   tm_wday;
  53.   int   tm_yday;
  54.   int   tm_isdst;
  55. };
  56.  
  57. #ifdef __cplusplus
  58. extern "C" {
  59. #endif
  60. char _FAR * _RTLENTRY _EXPFUNC   asctime(const struct tm _FAR *__tblock);
  61. char _FAR * _RTLENTRY _EXPFUNC   ctime(const time_t _FAR *__time);
  62. double      _RTLENTRY _EXPFUNC32 difftime(time_t __time2, time_t __time1);
  63. struct tm _FAR * _RTLENTRY _EXPFUNC gmtime(const time_t _FAR *__timer);
  64. struct tm _FAR * _RTLENTRY _EXPFUNC localtime(const time_t _FAR *__timer);
  65. time_t      _RTLENTRY _EXPFUNC32 time(time_t _FAR *__timer);
  66. time_t      _RTLENTRY _EXPFUNC   mktime(struct tm _FAR *__timeptr);
  67. clock_t     _RTLENTRY _EXPFUNC32 clock(void);
  68. size_t      _RTLENTRY _EXPFUNC   strftime(char _FAR *__s, size_t __maxsize,
  69.                         const char _FAR *__fmt, const struct tm _FAR *__t);
  70. size_t      _RTLENTRY _EXPFUNC   _lstrftime(char _FAR *__s, size_t __maxsize,
  71.                         const char _FAR *__fmt, const struct tm _FAR *__t);
  72.  
  73. #if !defined(__STDC__)  /* NON-ANSI */
  74. #define daylight  _daylight
  75. #define timezone  _timezone
  76. #define tzname    _tzname
  77. #endif
  78.  
  79. #if !defined(_RTLDLL) || defined(__FLAT__)
  80.  
  81. extern int               _RTLENTRY _EXPDATA _daylight;
  82. extern long              _RTLENTRY _EXPDATA _timezone;
  83. extern char _FAR * const _RTLENTRY _EXPDATA _tzname[2];
  84.  
  85. #else
  86.  
  87. int  _FAR *        _RTLENTRY _EXPFUNC __getDaylight(void);
  88. long _FAR *        _RTLENTRY _EXPFUNC __getTimezone(void);
  89. char _FAR * _FAR * _RTLENTRY _EXPFUNC __getTzname(void);
  90.  
  91. #define _daylight (*__getDaylight())
  92. #define _tzname   ( __getTzname())
  93. #define _timezone (*__getTimezone())
  94.  
  95. #endif  /* _RTLDLL */
  96.  
  97. int         _RTLENTRY           stime(time_t _FAR *__tp);
  98. void        _RTLENTRY  _EXPFUNC tzset(void);
  99. char _FAR * _RTLENTRY  _EXPFUNC _strdate(char _FAR *datestr);
  100. char _FAR * _RTLENTRY  _EXPFUNC _strtime(char _FAR *timestr);
  101.  
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105.  
  106.  
  107. #if !defined(__STDC__)
  108.  
  109. #if defined( __USELOCALES__ )
  110.  
  111. #define strftime   _lstrftime
  112.  
  113. #endif
  114.  
  115. #endif  /* __STDC__  */
  116.  
  117. #if !defined(_RC_INVOKED)
  118. #pragma option -a. /* restore default packing */
  119. #endif
  120.  
  121. #endif  /* __TIME_H */
  122.