home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / df3os2.zip / DTIMER.H < prev    next >
C/C++ Source or Header  |  1993-09-21  |  705b  |  42 lines

  1. // ----------- dtimer.h
  2. //
  3. // modified for OS/2 operation - jw21sep93
  4. //
  5. // uses OS/2 Timer services rather than doing
  6. // own timer management.
  7. //
  8. // renamed to avoid collision with Borlands Timer.h 
  9. //
  10.  
  11. #ifndef TIMER_H
  12. #define TIMER_H
  13.  
  14. #define INCL_BASE
  15. #define INCL_DOSDATETIME
  16. #define INCL_NOPMAPI
  17. #include <os2.h>
  18.  
  19. #include "dflatdef.h"
  20.  
  21.  
  22. class Timer    
  23.     {
  24.     HEV     sem;
  25.     HTIMER  timer;
  26.     APIRET  rc;
  27.     Bool    disabled;
  28.  
  29. public:
  30.     Timer();
  31.     ~Timer();
  32.     Bool    TimedOut();
  33.     void    SetTimer(int ticks);
  34.     void    DisableTimer();      
  35.     Bool    TimerRunning();      
  36.     void    Countdown()          { ; }
  37.     Bool    TimerDisabled()      { return disabled; }
  38.     };
  39.  
  40.  
  41. #endif
  42.