include/df/timer.hpp

00001 //Timer services
00002 
00003 class TimerCallback {
00004   public:
00005     virtual void TimerEvent(Timer *);
00006 };
00007 
00008 class Timer : public SystemCode {
00009   _PROTECTED_:
00010     PTR handle;
00011     uint32 millisec;
00012     Thread *This;  //to post messages
00013     TimerCallback *handler;
00014   public:
00015     //public data
00016     volatile uint32 Counter;
00017     BOOL Enabled;
00018     //ctor/dtor
00019     Timer();
00020     ~Timer() {Disable();}
00021     //public members
00022     void SetCallback(TimerCallback *);
00023     BOOL Enable(uint32 _millisec = 0);  //0=use last value specified
00024     void Disable();
00025     BOOL SetSpeed(uint32 _millisec);
00026     uint32 GetSpeed() { return millisec;}
00027 };
00028 

Generated on Mon Mar 5 09:49:14 2007 for DigiForce by  doxygen 1.4.7