Diana Software
QWatchdogTimer.hh
Go to the documentation of this file.
1 
2 #ifndef _Q_WATCHDOG_TIMER_HH_
3 #define _Q_WATCHDOG_TIMER_HH_
4 
5 namespace boost {
6  class mutex;
7  namespace posix_time {
8  class time_duration;
9  class ptime;
10  }
11 }
12 
13 class QError;
14 
21 {
22 public:
24  virtual ~QWatchdogTimer();
25 
27  QError SetTimeoutSec(double timeout);
35  QError TimeoutElapsed(bool& elapsed) const;
36 
38  QError Start();
39 
41  QError Stop();
42 private:
43 
44  //int kMutexTimeoutMillisec;
45  mutable boost::mutex* fMutex;
46  boost::posix_time::time_duration* fTimeout;
47  boost::posix_time::ptime* fLastStartTime;
48 };
49 #endif
error class with error type and description
Definition: QError.hh:115
thread-safe timer class
QError SetTimeoutSec(double timeout)
virtual ~QWatchdogTimer()
QError TimeoutElapsed(bool &elapsed) const
boost::posix_time::time_duration * fTimeout
boost::mutex * fMutex
boost::posix_time::ptime * fLastStartTime
Definition: QDb.hh:18