Source code of Windows XP (NT5)
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.

88 lines
1.7 KiB

  1. /* Header file for timer.dll. Use with timer.c for making the
  2. dll
  3. */
  4. typedef enum {
  5. KILOSECONDS,
  6. SECONDS,
  7. MILLISECONDS,
  8. MICROSECONDS,
  9. TENTHMICROSECS,
  10. NANOSECONDS,
  11. TIMER_FREE
  12. } _TimerUnits;
  13. #if (defined (WIN16) || defined (WIN32) || defined (NTWIN))
  14. #define SHORT short
  15. #define ULONG DWORD
  16. #define USHORT WORD
  17. #define PSHORT short *
  18. #define PSZ LPSTR
  19. #endif
  20. #if (defined (WIN16))
  21. #define PLONG LPSTR
  22. typedef struct _QWORD {
  23. ULONG ulLo;
  24. ULONG ulHi;
  25. } QWORD;
  26. typedef QWORD FAR *PQWORD;
  27. #endif
  28. #if (defined (WIN32) || defined (NTWIN))
  29. #ifdef W32S
  30. typedef struct _QWORD {
  31. ULONG ulLo;
  32. ULONG ulHi;
  33. } QWORD;
  34. #define PQWORD QWORD *
  35. #else
  36. #define PQWORD PLARGE_INTEGER
  37. #endif
  38. #endif
  39. #if (!defined (WIN32) && !defined (NTWIN))
  40. #define OPTIONAL
  41. #endif
  42. #if (defined (OS2SS) || defined (NTNAT) || defined (WIN32) || defined (NTWIN))
  43. #define far
  44. #if (!defined (WIN32) && !defined (NTWIN))
  45. #define FAR
  46. #endif
  47. #endif
  48. #ifdef NTNAT
  49. #define BOOL BOOLEAN
  50. #endif
  51. #ifdef OS2386
  52. #define far
  53. #endif
  54. SHORT FAR PASCAL TimerOpen (SHORT far *, _TimerUnits);
  55. SHORT FAR PASCAL TimerInit (SHORT);
  56. ULONG FAR PASCAL TimerRead (SHORT);
  57. SHORT FAR PASCAL TimerClose (SHORT);
  58. BOOL FAR PASCAL TimerReport (PSZ, SHORT);
  59. VOID FAR PASCAL TimerQueryPerformanceCounter (PQWORD, PQWORD);
  60. ULONG FAR PASCAL TimerConvertTicsToUSec (ULONG, ULONG);
  61. #define TIMERERR_NOT_AVAILABLE 1
  62. #define TIMERERR_NO_MORE_HANDLES 2
  63. #define TIMERERR_INVALID_UNITS 3
  64. #define TIMERERR_INVALID_HANDLE 4
  65. #define TIMERERR_OVERFLOW 0xffffffff
  66. typedef struct {
  67. ULONG ulLo;
  68. ULONG ulHi;
  69. _TimerUnits TUnits;
  70. } Timer;
  71. #ifdef WIN16
  72. #define MAX_TIMERS 500
  73. #else
  74. #define MAX_TIMERS 5000
  75. #endif