Changeset 13 in flair-dev for trunk/include/FlairCore/Watchdog.h
- Timestamp:
- Apr 8, 2016, 3:39:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairCore/Watchdog.h
r2 r13 20 20 namespace core { 21 21 22 23 24 25 26 27 28 29 class Watchdog:public Thread {30 31 Watchdog(const Object* parent,std::function<void()> _expired,Time _timer);32 22 /*! \class Watchdog 23 * 24 * \brief Watchdog class 25 * 26 * Calls a given function if not touched within a specified period of time 27 * 28 */ 29 class Watchdog : public Thread { 30 public: 31 Watchdog(const Object *parent, std::function<void()> _expired, Time _timer); 32 ~Watchdog(); 33 33 34 //reset the timer 35 void Touch(); 36 void SetTimer(Time _Timer); 37 private: 38 void Run(); 39 std::function<void()> expired; 40 Time timer; 41 }; 34 // reset the timer 35 void Touch(); 36 void SetTimer(Time _Timer); 37 38 private: 39 void Run(); 40 std::function<void()> expired; 41 Time timer; 42 }; 42 43 43 44 } // end namespace core
Note:
See TracChangeset
for help on using the changeset viewer.