home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 2.ddi / INCLUDE.ZIP / TIME.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  1.7 KB  |  89 lines

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