home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / include / timefold.h < prev    next >
C/C++ Source or Header  |  1995-05-08  |  487b  |  24 lines

  1. // ------ timefold.h
  2.  
  3. #ifndef  TIMEFOLD_H
  4. #define  TIMEFOLD_H
  5.  
  6. #include "handler.h"
  7. #include "folder.h"
  8.  
  9. class Hand;
  10.  
  11. class TimerFolder : public Folder  {
  12.   EventHandler tick[CLOCKTICKS];
  13.   friend class TimerServer;
  14. public:
  15.   TimerFolder() : Folder(tick, CLOCKTICKS) { }
  16.   void add_timer(Hand*,int rate,callback);
  17.   void del_timer(Hand*,int rate,callback);
  18.   void reset();
  19.   void dispatch(int tickno, int, int)
  20.     { tick[tickno].execute_callbacks(); }
  21. };
  22.  
  23. #endif
  24.