00001 00020 #ifndef __NEW_SIM_TIMER_THREAD_H__ 00021 #define __NEW_SIM_TIMER_THREAD_H__ 00022 00023 #ifndef __NEW_SIM_UTILS_H__ 00024 #include "new_sim_utils.h" 00025 #endif 00026 00027 #ifndef __THREAD_H__ 00028 #include "thread.h" 00029 #endif 00030 00031 class NewSimulatorWatchdog; 00032 class NewSimulatorHotSwap; 00033 class NewSimulatorTimerThread; 00034 00036 #define THREAD_SLEEPTIME 10000 00037 00043 class NewSimulatorTimerThread : public cThread { 00044 00045 private: 00046 00048 unsigned int m_timeout; 00050 cTime m_start; 00051 00052 protected: 00053 virtual void *Run(); 00055 bool m_running; 00057 virtual bool TriggerAction() = 0; 00058 00059 public: 00061 bool m_exit; 00062 00063 NewSimulatorTimerThread( unsigned int ms_timeout ); 00064 virtual ~NewSimulatorTimerThread(); 00065 00066 void Stop(); 00067 unsigned int Reset( unsigned int new_timeout ); 00068 00069 }; 00070 00071 00072 #endif