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.

144 lines
1.5 KiB

  1. /*
  2. * alarm.h
  3. *
  4. * Copyright (c) 1994 by DataBeam Corporation, Lexington, Kentucky
  5. *
  6. * Abstract:
  7. *
  8. * Caveats:
  9. * None
  10. *
  11. * Author:
  12. * James P. Galvin, Jr.
  13. *
  14. * Revision History:
  15. * 09JAN95 jpg Original
  16. */
  17. #ifndef _ALARM_
  18. #define _ALARM_
  19. /*
  20. * This is the class definition for the Alarm class.
  21. */
  22. class CAlarm
  23. {
  24. public:
  25. CAlarm(UINT nDuration);
  26. ~CAlarm(void) { }
  27. void Set(UINT nDuration);
  28. void Reset(void);
  29. void Expire(void) { m_fExpired = TRUE; }
  30. BOOL IsExpired(void);
  31. private:
  32. UINT m_nDuration;
  33. UINT m_nStartTime;
  34. BOOL m_fExpired;
  35. };
  36. typedef CAlarm Alarm, *PAlarm;
  37. /*
  38. * Alarm (
  39. * Long duration)
  40. *
  41. * Function Description
  42. *
  43. * Formal Parameters
  44. *
  45. * Return value
  46. *
  47. * Side Effects
  48. *
  49. * Caveats
  50. */
  51. /*
  52. * ~Alarm ()
  53. *
  54. * Function Description
  55. *
  56. * Formal Parameters
  57. *
  58. * Return value
  59. *
  60. * Side Effects
  61. *
  62. * Caveats
  63. */
  64. /*
  65. * Void Set (
  66. * Long duration)
  67. *
  68. * Function Description
  69. *
  70. * Formal Parameters
  71. *
  72. * Return value
  73. *
  74. * Side Effects
  75. *
  76. * Caveats
  77. */
  78. /*
  79. * Void Reset ()
  80. *
  81. * Function Description
  82. *
  83. * Formal Parameters
  84. *
  85. * Return value
  86. *
  87. * Side Effects
  88. *
  89. * Caveats
  90. */
  91. /*
  92. * Long GetTimeRemaining ()
  93. *
  94. * Function Description
  95. *
  96. * Formal Parameters
  97. *
  98. * Return value
  99. *
  100. * Side Effects
  101. *
  102. * Caveats
  103. */
  104. /*
  105. * Void Expire ()
  106. *
  107. * Function Description
  108. *
  109. * Formal Parameters
  110. *
  111. * Return value
  112. *
  113. * Side Effects
  114. *
  115. * Caveats
  116. */
  117. /*
  118. * BOOL IsExpired ()
  119. *
  120. * Function Description
  121. *
  122. * Formal Parameters
  123. *
  124. * Return value
  125. *
  126. * Side Effects
  127. *
  128. * Caveats
  129. */
  130. #endif