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.

40 lines
821 B

  1. // Gemplus (C) 1999
  2. // Version 1.0
  3. // Author: Sergey Ivanov
  4. // Date of creation - 18.05.1999
  5. // Change log:
  6. //
  7. #ifndef __TIMER__
  8. #define __TIMER__
  9. #include "generic.h"
  10. #define DELAY(t)\
  11. {if(t){CTimer* timer = kernel->createTimer(NotificationTimer);\
  12. if(ALLOCATED_OK(timer)) {timer->delay(t);\
  13. timer->dispose();}}}
  14. #pragma PAGEDCODE
  15. // This class will manage creation and
  16. // manipulation of driver Timers
  17. class CTimer;
  18. class CTimer
  19. {
  20. public:
  21. NTSTATUS m_Status;
  22. SAFE_DESTRUCTORS();
  23. virtual VOID dispose(){self_delete();};
  24. protected:
  25. KTIMER Timer;
  26. protected:
  27. CTimer(){};
  28. virtual ~CTimer(){};
  29. public:
  30. PKTIMER getHandle(){return &Timer;};
  31. virtual BOOL set(LARGE_INTEGER DueTime,LONG Period,PKDPC Dpc) {return FALSE;};
  32. virtual BOOL cancel() {return FALSE;};
  33. virtual VOID delay(ULONG Delay) {};
  34. };
  35. #endif//TIMER