home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / soss.arj / INCLUDE / TIME.H < prev    next >
C/C++ Source or Header  |  1991-04-11  |  2KB  |  80 lines

  1. /***
  2. *time.h - definitions/declarations for time routines
  3. *
  4. *   Copyright (c) 1985-1988, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *   This file has declarations of time routines and defines
  8. *   the structure returned by the localtime and gmtime routines and
  9. *   used by asctime.
  10. *   [ANSI/System V]
  11. *
  12. *******************************************************************************/
  13.  
  14.  
  15. #ifndef NO_EXT_KEYS /* extensions enabled */
  16.     #define _CDECL  cdecl
  17.     #define _NEAR   near
  18. #else /* extensions not enabled */
  19.     #define _CDECL
  20.     #define _NEAR
  21. #endif /* NO_EXT_KEYS */
  22.  
  23.  
  24. /* define the implementation defined time type */
  25.  
  26. #ifndef _TIME_T_DEFINED
  27. typedef long time_t;            /* time value */
  28. #define _TIME_T_DEFINED         /* avoid multiple def's of time_t */
  29. #endif
  30.  
  31. #ifndef _CLOCK_T_DEFINED
  32. typedef long clock_t;
  33. #define _CLOCK_T_DEFINED
  34. #endif
  35.  
  36. #ifndef _TM_DEFINED
  37. struct tm {
  38.     int tm_sec;         /* seconds after the minute - [0,59] */
  39.     int tm_min;         /* minutes after the hour - [0,59] */
  40.     int tm_hour;        /* hours since midnight - [0,23] */
  41.     int tm_mday;        /* day of the month - [1,31] */
  42.     int tm_mon;         /* months since January - [0,11] */
  43.     int tm_year;        /* years since 1900 */
  44.     int tm_wday;        /* days since Sunday - [0,6] */
  45.     int tm_yday;        /* days since January 1 - [0,365] */
  46.     int tm_isdst;       /* daylight savings time flag */
  47.     };
  48. #define _TM_DEFINED
  49. #endif
  50.  
  51. #define CLK_TCK 1000
  52.  
  53. struct timeval {
  54.     long tv_usec;
  55.     long tv_sec;
  56. };
  57.  
  58. /* extern declarations for the global variables used by the ctime family of
  59.  * routines.
  60.  */
  61.  
  62. extern int _NEAR _CDECL daylight;     /* non-zero if daylight savings time is used */
  63. extern long _NEAR _CDECL timezone;    /* difference in seconds between GMT and local time */
  64. extern char * _NEAR _CDECL tzname[2]; /* standard/daylight savings time zone names */
  65.  
  66.  
  67. /* function prototypes */
  68.  
  69. char * _CDECL asctime(const struct tm *);
  70. char * _CDECL ctime(const time_t *);
  71. clock_t _CDECL clock(void);
  72. double _CDECL difftime(time_t, time_t);
  73. struct tm * _CDECL gmtime(const time_t *);
  74. struct tm * _CDECL localtime(const time_t *);
  75. time_t _CDECL mktime(struct tm *);
  76. char * _CDECL _strdate(char *);
  77. char * _CDECL _strtime(char *);
  78. time_t _CDECL time(time_t *);
  79. void _CDECL tzset(void);
  80.