Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
2.9 KiB

  1. /***
  2. *time.h - definitions/declarations for time routines
  3. *
  4. * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file contains the various declarations and definitions
  8. * for the time routines.
  9. * [ANSI/System V]
  10. *
  11. ****/
  12. #ifndef _INC_TIME
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #if (_MSC_VER <= 600)
  17. #define __cdecl _cdecl
  18. #define __far _far
  19. #define __near _near
  20. #define __pascal _pascal
  21. #endif
  22. /* implementation defined time types */
  23. #ifndef _TIME_T_DEFINED
  24. typedef long time_t;
  25. #define _TIME_T_DEFINED
  26. #endif
  27. #ifndef _CLOCK_T_DEFINED
  28. typedef long clock_t;
  29. #define _CLOCK_T_DEFINED
  30. #endif
  31. #ifndef _SIZE_T_DEFINED
  32. typedef unsigned int size_t;
  33. #define _SIZE_T_DEFINED
  34. #endif
  35. /* structure for use with localtime(), gmtime(), etc. */
  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. /* define NULL pointer value */
  51. #ifndef NULL
  52. #ifdef __cplusplus
  53. #define NULL 0
  54. #else
  55. #define NULL ((void *)0)
  56. #endif
  57. #endif
  58. /* clock ticks macro - ANSI version */
  59. #define CLOCKS_PER_SEC 1000
  60. /* extern declarations for the global variables used by the ctime family of
  61. * routines.
  62. */
  63. extern int __near __cdecl _daylight; /* non-zero if daylight savings time is used */
  64. extern long __near __cdecl _timezone; /* difference in seconds between GMT and local time */
  65. extern char * __near __cdecl _tzname[2];/* standard/daylight savings time zone names */
  66. /* function prototypes */
  67. #ifdef _MT
  68. double __pascal difftime(time_t, time_t);
  69. #else
  70. double __cdecl difftime(time_t, time_t);
  71. #endif
  72. char * __cdecl asctime(const struct tm *);
  73. char * __cdecl ctime(const time_t *);
  74. #ifndef _WINDLL
  75. clock_t __cdecl clock(void);
  76. #endif
  77. struct tm * __cdecl gmtime(const time_t *);
  78. struct tm * __cdecl localtime(const time_t *);
  79. time_t __cdecl mktime(struct tm *);
  80. #ifndef _WINDLL
  81. size_t __cdecl strftime(char *, size_t, const char *,
  82. const struct tm *);
  83. #endif
  84. char * __cdecl _strdate(char *);
  85. char * __cdecl _strtime(char *);
  86. time_t __cdecl time(time_t *);
  87. void __cdecl _tzset(void);
  88. #ifndef __STDC__
  89. /* Non-ANSI names for compatibility */
  90. #define CLK_TCK CLOCKS_PER_SEC
  91. extern int __near __cdecl daylight;
  92. extern long __near __cdecl timezone;
  93. extern char * __near __cdecl tzname[2];
  94. void __cdecl tzset(void);
  95. #endif
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #define _INC_TIME
  100. #endif