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.

61 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. timer.h
  5. Abstract:
  6. This module contains routines to schedule timer events.
  7. Author:
  8. Jameel Hyder (jameelh@microsoft.com)
  9. Revision History:
  10. Jul 1996 Initial Version
  11. Notes: Tab stop: 4
  12. --*/
  13. #ifndef _TIMER_
  14. #define _TIMER_
  15. struct _Timer;
  16. typedef
  17. BOOLEAN
  18. (*TIMER_ROUTINE)(
  19. IN struct _IntF * pIntF,
  20. IN struct _Timer * pTimer,
  21. IN BOOLEAN TimerShuttingDown
  22. );
  23. typedef struct _Timer
  24. {
  25. struct _Timer * Next;
  26. struct _Timer ** Prev;
  27. TIMER_ROUTINE Routine; // Timer routine
  28. SHORT AbsTime; // Absolute time, for re-enqueue
  29. SHORT RelDelta; // Relative to the previous entry
  30. } TIMER, *PTIMER;
  31. #define ArpSTimerInitialize(pTimer, TimerRoutine, DeltaTime) \
  32. { \
  33. (pTimer)->Routine = TimerRoutine; \
  34. (pTimer)->AbsTime = DeltaTime; \
  35. }
  36. #define ArpSGetCurrentTick() ArpSTimerCurrentTick
  37. // Keep this at 15 sec units
  38. #define MULTIPLIER 4 // To convert minutes to ticks
  39. #define TIMER_TICK -15*10000000L // 15s in 100ns units
  40. #endif // _TIMER_
  41.