home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c220 / 4.ddi / INC / TIME.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-16  |  2.3 KB  |  70 lines

  1. /*
  2.  *   time.h -- ANSI
  3.  *
  4.  *   Functions, types, and a macro for manipulating
  5.  *   representations of time.
  6.  *
  7.  *           Copyright (c) 1990, MetaWare Incorporated
  8.  */
  9.  
  10. #ifndef _TIME_H
  11. #define _TIME_H
  12.  
  13. #if __HIGHC__
  14. #define Local_time_zone 8     /* delta from gmt in hours */
  15. #define CLK_TCK CLOCKS_PER_SEC  /* obsolete. */
  16. extern void tzset(void);  /* non-ansi function name. */
  17. #endif
  18. extern void _tzset(void);  /* extra-ansi function name. */
  19.  
  20. extern long _timezone; /* delta from gmt in seconds; initialized to Local_time_zone * 3600 in module timezone.c */
  21.  
  22. #define CLOCKS_PER_SEC 100    /* new ANSI name. */
  23.  
  24. extern int _daylight;      /* zero if not daylight savings time */
  25. extern char * _tzname[2];  /* standard and daylight time zone names */
  26. #ifdef __HIGHC__
  27. extern long timezone; /* defined for msc compatibility only; not needed otherwise */
  28. #pragma alias(timezone,"_timezone");
  29. extern int daylight;      /* zero if not daylight savings time */
  30. #pragma alias(daylight,"_daylight");
  31. extern char * tzname[2];  /* standard and daylight time zone names */
  32. #pragma alias(tzname,"_tzname");
  33. #endif
  34.  
  35. #ifndef _SIZE_T_DEFINED
  36. #define _SIZE_T_DEFINED
  37. typedef unsigned int size_t;
  38. #endif
  39.  
  40. typedef long time_t;
  41. typedef long clock_t;
  42.  
  43. struct tm {
  44.        int tm_sec;      /*seconds after the minute- 0..59*/
  45.        int tm_min;      /*minutes after the hour- 0..59*/
  46.        int tm_hour;   /*hours since midnight- 0..23*/
  47.        int tm_mday;   /*day of the month- 1..31*/
  48.        int tm_mon;      /*month of the year- 0..11*/
  49.        int tm_year;   /*years since 1900*/
  50.        int tm_wday;   /*days since Sunday- 0..6*/
  51.        int tm_yday;   /*day of the year- 0..365*/
  52.        int tm_isdst;  /*daylight savings time- boolean (0..1)*/
  53.        };
  54.  
  55. extern size_t strftime(char *__s, size_t __maxsize,
  56.                        const char *__format, const struct tm *__timeptr);
  57. extern time_t mktime(struct tm *);
  58. extern char * _strdate(char *);
  59. extern char * _strtime(char *);
  60.  
  61. extern clock_t clock(void); /* Time of day in 100ths of a second. */
  62. extern time_t time(time_t *__timer);
  63. extern char *asctime(const struct tm *__timeptr);
  64. extern char *ctime(const time_t *__timer);
  65. extern double difftime(time_t __time2, time_t __time1);
  66. extern struct tm *gmtime(const time_t *__timer);
  67. extern struct tm *localtime(const time_t *__timer);
  68.  
  69. #endif /* _TIME_H */
  70.