home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / TIME.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  3KB  |  126 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 1.5
  9.  *
  10.  *      Copyright (c) 1987, 1994 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.  
  23. #if !defined(RC_INVOKED)
  24.  
  25. #if defined(__STDC__)
  26. #pragma warn -nak
  27. #endif
  28.  
  29. #pragma option -a-
  30.  
  31. #endif  /* !RC_INVOKED */
  32.  
  33.  
  34. #ifndef _SIZE_T
  35. #define _SIZE_T
  36. typedef unsigned size_t;
  37. #endif
  38.  
  39. #ifndef  _TIME_T
  40. #define  _TIME_T
  41. typedef long time_t;
  42. #endif
  43.  
  44. #ifndef  _CLOCK_T
  45. #define  _CLOCK_T
  46. typedef long clock_t;
  47. #endif
  48.  
  49. #define CLOCKS_PER_SEC 1000.0
  50. #define CLK_TCK        1000.0
  51.  
  52. struct tm
  53. {
  54.   int   tm_sec;
  55.   int   tm_min;
  56.   int   tm_hour;
  57.   int   tm_mday;
  58.   int   tm_mon;
  59.   int   tm_year;
  60.   int   tm_wday;
  61.   int   tm_yday;
  62.   int   tm_isdst;
  63. };
  64.  
  65. #ifdef __cplusplus
  66. extern "C" {
  67. #endif
  68. char _FAR * _RTLENTRY _EXPFUNC   asctime(const struct tm _FAR *__tblock);
  69. char _FAR * _RTLENTRY _EXPFUNC   ctime(const time_t _FAR *__time);
  70. double      _RTLENTRY _EXPFUNC32 difftime(time_t __time2, time_t __time1);
  71. struct tm _FAR * _RTLENTRY _EXPFUNC gmtime(const time_t _FAR *__timer);
  72. struct tm _FAR * _RTLENTRY _EXPFUNC localtime(const time_t _FAR *__timer);
  73. time_t      _RTLENTRY _EXPFUNC32 time(time_t _FAR *__timer);
  74. time_t      _RTLENTRY _EXPFUNC   mktime(struct tm _FAR *__timeptr);
  75. clock_t     _RTLENTRY _EXPFUNC32 clock(void);
  76. size_t      _RTLENTRY _EXPFUNC   strftime(char _FAR *__s, size_t __maxsize,
  77.                         const char _FAR *__fmt, const struct tm _FAR *__t);
  78. size_t      _RTLENTRY _EXPFUNC   _lstrftime(char _FAR *__s, size_t __maxsize,
  79.                         const char _FAR *__fmt, const struct tm _FAR *__t);
  80.  
  81. #if !defined(__STDC__)  /* NON-ANSI */
  82. #define daylight  _daylight
  83. #define timezone  _timezone
  84. #define tzname    _tzname
  85. #endif
  86.  
  87.  
  88. extern int               _RTLENTRY _EXPDATA _daylight;
  89. extern long              _RTLENTRY _EXPDATA _timezone;
  90. extern char _FAR * const _RTLENTRY _EXPDATA _tzname[2];
  91.  
  92.  
  93. int         _RTLENTRY           stime(time_t _FAR *__tp);
  94. void        _RTLENTRY  _EXPFUNC tzset(void);
  95. char _FAR * _RTLENTRY  _EXPFUNC _strdate(char _FAR *datestr);
  96. char _FAR * _RTLENTRY  _EXPFUNC _strtime(char _FAR *timestr);
  97.  
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101.  
  102.  
  103. #if !defined(__STDC__)
  104.  
  105. #if defined( __USELOCALES__ )
  106.  
  107. #define strftime   _lstrftime
  108.  
  109. #endif
  110.  
  111. #endif  /* __STDC__  */
  112.  
  113.  
  114. #if !defined(RC_INVOKED)
  115.  
  116. #pragma option -a. /* restore default packing */
  117.  
  118. #if defined(__STDC__)
  119. #pragma warn .nak
  120. #endif
  121.  
  122. #endif  /* !RC_INVOKED */
  123.  
  124.  
  125. #endif  /* __TIME_H */
  126.