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

  1. /*  time.h
  2.  
  3.     Struct and function declarations for dealing with time.
  4.  
  5.     Copyright (c) 1987, 1991 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.  
  31. #define CLOCKS_PER_SEC 18.2
  32. #define CLK_TCK        18.2
  33.  
  34. #endif  /* _TIME_T */
  35.  
  36. struct tm
  37. {
  38.   int   tm_sec;
  39.   int   tm_min;
  40.   int   tm_hour;
  41.   int   tm_mday;
  42.   int   tm_mon;
  43.   int   tm_year;
  44.   int   tm_wday;
  45.   int   tm_yday;
  46.   int   tm_isdst;
  47. };
  48.  
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52. char *     _Cdecl asctime(const struct tm *__tblock);
  53. char *     _Cdecl ctime(const time_t *__time);
  54. double      _Cdecl difftime(time_t __time2, time_t __time1);
  55. struct tm * _Cdecl gmtime(const time_t *__timer);
  56. struct tm * _Cdecl localtime(const time_t *__timer);
  57. time_t      _Cdecl time(time_t *__timer);
  58. time_t      _Cdecl mktime(struct tm *__timeptr);
  59. clock_t     _Cdecl clock(void);
  60. size_t      _Cdecl strftime(char *__s, size_t __maxsize,
  61.                         const char *__fmt, const struct tm *__t);
  62.  
  63. #if !__STDC__
  64.  
  65. extern int  _Cdecl  daylight;
  66. extern long _Cdecl  timezone;
  67. extern char * const _Cdecl tzname[2];
  68.  
  69. int         _Cdecl  stime(time_t *__tp);
  70. void        _Cdecl  tzset(void);
  71. char * _Cdecl  _strdate(char *datestr);
  72. char * _Cdecl  _strtime(char *timestr);
  73. #endif
  74.  
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78.  
  79. #endif
  80.