home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / sys / timeb.h < prev    next >
C/C++ Source or Header  |  1998-06-16  |  2KB  |  119 lines

  1. /***
  2. *sys/timeb.h - definition/declarations for _ftime()
  3. *
  4. *       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       This file define the _ftime() function and the types it uses.
  8. *       [System V]
  9. *
  10. *       [Public]
  11. *
  12. ****/
  13.  
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17.  
  18. #ifndef _INC_TIMEB
  19. #define _INC_TIMEB
  20.  
  21. #if !defined(_WIN32) && !defined(_MAC)
  22. #error ERROR: Only Mac or Win32 targets supported!
  23. #endif
  24.  
  25.  
  26. #ifdef  _MSC_VER
  27. #pragma pack(push,8)
  28. #endif  /* _MSC_VER */
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34.  
  35.  
  36. /* Define _CRTIMP */
  37.  
  38. #ifndef _CRTIMP
  39. #ifdef  _DLL
  40. #define _CRTIMP __declspec(dllimport)
  41. #else   /* ndef _DLL */
  42. #define _CRTIMP
  43. #endif  /* _DLL */
  44. #endif  /* _CRTIMP */
  45.  
  46.  
  47. /* Define __cdecl for non-Microsoft compilers */
  48.  
  49. #if     ( !defined(_MSC_VER) && !defined(__cdecl) )
  50. #define __cdecl
  51. #endif
  52.  
  53. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  54.  
  55. #ifndef _CRTAPI1
  56. #if    _MSC_VER >= 800 && _M_IX86 >= 300
  57. #define _CRTAPI1 __cdecl
  58. #else
  59. #define _CRTAPI1
  60. #endif
  61. #endif
  62.  
  63.  
  64. #ifndef _TIME_T_DEFINED
  65. typedef long time_t;
  66. #define _TIME_T_DEFINED
  67. #endif
  68.  
  69.  
  70. /* Structure returned by _ftime system call */
  71.  
  72. #ifndef _TIMEB_DEFINED
  73. struct _timeb {
  74.         time_t time;
  75.         unsigned short millitm;
  76.         short timezone;
  77.         short dstflag;
  78.         };
  79.  
  80. #if     !__STDC__
  81.  
  82. /* Non-ANSI name for compatibility */
  83.  
  84. struct timeb {
  85.         time_t time;
  86.         unsigned short millitm;
  87.         short timezone;
  88.         short dstflag;
  89.         };
  90.  
  91. #endif
  92.  
  93. #define _TIMEB_DEFINED
  94. #endif
  95.  
  96.  
  97. /* Function prototypes */
  98.  
  99. _CRTIMP void __cdecl _ftime(struct _timeb *);
  100.  
  101. #if     !__STDC__
  102.  
  103. /* Non-ANSI name for compatibility */
  104.  
  105. _CRTIMP void __cdecl ftime(struct timeb *);
  106.  
  107. #endif
  108.  
  109.  
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113.  
  114. #ifdef  _MSC_VER
  115. #pragma pack(pop)
  116. #endif  /* _MSC_VER */
  117.  
  118. #endif  /* _INC_TIMEB */
  119.