timer.h 369 B

12345678910111213141516171819202122232425262728
  1. #ifndef BB_TIMER_H
  2. #define BB_TIMER_H
  3. #include <bbmonkey.h>
  4. class bbTimer : public bbObject{
  5. public:
  6. bbTimer( int freq,bbFunction<void()> fired );
  7. bool suspended();
  8. void setSuspended( bool suspended );
  9. void reset();
  10. void cancel();
  11. private:
  12. struct Rep;
  13. Rep *_rep;
  14. static unsigned sdl_timer_callback( unsigned interval,void *param );
  15. };
  16. #endif