home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / INCLUDE.ZIP / TIME.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  2.1 KB  |  93 lines

  1. /*  time.h
  2.  
  3.     Struct and function declarations for dealing with time.
  4.  
  5.     Copyright (c) 1987, 1992 by Borland International
  6.     All Rights Reserved.
  7. */
  8.  
  9. #ifndef __TIME_H
  10. #define __TIME_H
  11.  
  12. #if !defined(___DEFS_H)
  13. #include <_defs.h>
  14. #endif
  15.  
  16. #ifndef _SIZE_T
  17. #define _SIZE_T
  18. typedef unsigned size_t;
  19. #endif
  20.  
  21. #ifndef  _TIME_T
  22. #define  _TIME_T
  23. typedef long time_t;
  24. #endif
  25.  
  26. #ifndef  _CLOCK_T
  27. #define  _CLOCK_T
  28. typedef long clock_t;
  29.  
  30. #define CLOCKS_PER_SEC 18.2
  31. #define CLK_TCK        18.2
  32.  
  33. #endif  /* _TIME_T */
  34.  
  35. struct tm
  36. {
  37.   int   tm_sec;
  38.   int   tm_min;
  39.   int   tm_hour;
  40.   int   tm_mday;
  41.   int   tm_mon;
  42.   int   tm_year;
  43.   int   tm_wday;
  44.   int   tm_yday;
  45.   int   tm_isdst;
  46. };
  47.  
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51. char _FAR *     _Cdecl _FARFUNC asctime(const struct tm _FAR *__tblock);
  52. char _FAR *     _Cdecl _FARFUNC ctime(const time_t _FAR *__time);
  53. double      _Cdecl difftime(time_t __time2, time_t __time1);
  54. struct tm _FAR * _Cdecl _FARFUNC gmtime(const time_t _FAR *__timer);
  55. struct tm _FAR * _Cdecl _FARFUNC localtime(const time_t _FAR *__timer);
  56. time_t      _Cdecl time(time_t _FAR *__timer);
  57. time_t      _Cdecl _FARFUNC mktime(struct tm _FAR *__timeptr);
  58. clock_t     _Cdecl clock(void);
  59. size_t      _Cdecl _FARFUNC strftime(char _FAR *__s, size_t __maxsize,
  60.                         const char _FAR *__fmt, const struct tm _FAR *__t);
  61.  
  62. #if !__STDC__
  63.  
  64. #if !defined(_RTLDLL)
  65.  
  66. extern int  _Cdecl  daylight;
  67. extern long _Cdecl  timezone;
  68. extern char _FAR * const _Cdecl tzname[2];
  69.  
  70. #else
  71.  
  72. int  far * far _Cdecl       __getDaylight(void);
  73. long far * far _Cdecl       __getTimezone(void);
  74. char far * far * far _Cdecl __getTzname(void);
  75.  
  76. #define daylight (*__getDaylight())
  77. #define timezone (*__getTimezone())
  78. #define tzname   (__getTzname())
  79.  
  80. #endif  /* _RTLDLL */
  81.  
  82. int         _Cdecl  stime(time_t _FAR *__tp);
  83. void        _Cdecl  _FARFUNC tzset(void);
  84. char _FAR * _Cdecl  _FARFUNC _strdate(char _FAR *datestr);
  85. char _FAR * _Cdecl  _FARFUNC _strtime(char _FAR *timestr);
  86. #endif
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91.  
  92. #endif
  93.