home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / CIT.v4 / citra / CITTimer.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  1007 b   |  47 lines

  1. //
  2. //                CITTimer include
  3. //
  4. //                     StormC
  5. //
  6. //                version 2002.02.15
  7. //
  8.  
  9. #ifndef CIT_CITTIMER_H
  10. #define CIT_CITTIMER_H TRUE
  11.  
  12. #include "CITApp.h"
  13.  
  14. extern void SysTime(ULONG &t);
  15. extern void SysTime(double &t);
  16. extern ULONG EClock(struct EClockVal &ev);
  17.  
  18. class CITTimer:public CITAppClass
  19. {
  20.   public:
  21.     void AddEvent(double t,void (*p)(),BYTE prior=0);
  22.     void AddEvent(double t,void *that, void *p,BYTE prior=0);
  23.     void Abort(void (*p)());
  24.     void Abort(void *that, void *p);
  25.     CITTimer();
  26.     ~CITTimer();
  27.  
  28.   protected:
  29.     virtual BOOL Create(class CITApp* CITApp);
  30.     virtual void Delete(); 
  31.     virtual void HandleExcept(ULONG Sigs);
  32.     virtual void HandleEvent(ULONG Sigs);
  33.  
  34.   private:
  35.     CITList trList0;
  36.     CITList trList1;
  37.     struct timerequest *tr0;
  38.     struct MsgPort *ReplyPort0;
  39.     struct timerequest *tr1;
  40.     struct MsgPort *ReplyPort1;
  41.     
  42.     void CleanUp();
  43.     void AddRequest(double t,class TimerReqNode* tn,BYTE prior);
  44. };
  45.  
  46. #endif
  47.