gxtimer.h 369 B

12345678910111213141516171819202122232425
  1. #ifndef GXTIMER_H
  2. #define GXTIMER_H
  3. class gxRuntime;
  4. class gxTimer{
  5. public:
  6. gxTimer( gxRuntime *rt,int hertz );
  7. ~gxTimer();
  8. static void CALLBACK timerCallback( UINT id,UINT msg,DWORD user,DWORD dw1,DWORD dw2 );
  9. private:
  10. gxRuntime *runtime;
  11. HANDLE event;
  12. MMRESULT timerID;
  13. int ticks_put,ticks_get;
  14. /***** GX INTERFACE *****/
  15. public:
  16. int wait();
  17. };
  18. #endif