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.

75 lines
2.3 KiB

  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. #ifndef NO_EXT_KEYS /* extensions enabled */
  14. #define _CDECL cdecl
  15. #define _NEAR near
  16. #else /* extensions not enabled */
  17. #define _CDECL
  18. #define _NEAR
  19. #endif /* NO_EXT_KEYS */
  20. /* define the implementation defined time type */
  21. #ifndef _TIME_T_DEFINED
  22. typedef long time_t; /* time value */
  23. #define _TIME_T_DEFINED /* avoid multiple def's of time_t */
  24. #endif
  25. #ifndef _CLOCK_T_DEFINED
  26. typedef long clock_t;
  27. #define _CLOCK_T_DEFINED
  28. #endif
  29. #ifndef _TM_DEFINED
  30. struct tm {
  31. int tm_sec; /* seconds after the minute - [0,59] */
  32. int tm_min; /* minutes after the hour - [0,59] */
  33. int tm_hour; /* hours since midnight - [0,23] */
  34. int tm_mday; /* day of the month - [1,31] */
  35. int tm_mon; /* months since January - [0,11] */
  36. int tm_year; /* years since 1900 */
  37. int tm_wday; /* days since Sunday - [0,6] */
  38. int tm_yday; /* days since January 1 - [0,365] */
  39. int tm_isdst; /* daylight savings time flag */
  40. };
  41. #define _TM_DEFINED
  42. #endif
  43. #define CLK_TCK 1000
  44. /* extern declarations for the global variables used by the ctime family of
  45. * routines.
  46. */
  47. extern int _NEAR _CDECL daylight; /* non-zero if daylight savings time is used */
  48. extern long _NEAR _CDECL timezone; /* difference in seconds between GMT and local time */
  49. extern char * _NEAR _CDECL tzname[2]; /* standard/daylight savings time zone names */
  50. /* function prototypes */
  51. char * _CDECL asctime(const struct tm *);
  52. char * _CDECL ctime(const time_t *);
  53. clock_t _CDECL clock(void);
  54. double _CDECL difftime(time_t, time_t);
  55. struct tm * _CDECL gmtime(const time_t *);
  56. struct tm * _CDECL localtime(const time_t *);
  57. time_t _CDECL mktime(struct tm *);
  58. char * _CDECL _strdate(char *);
  59. char * _CDECL _strtime(char *);
  60. time_t _CDECL time(time_t *);
  61. void _CDECL tzset(void);