4 #include <boost/date_time/posix_time/posix_time.hpp>
5 #include <boost/thread/mutex.hpp>
6 #include <boost/thread/locks.hpp>
15 fMutex =
new boost::mutex();
33 boost::lock_guard<boost::mutex> lock(*
fMutex);
35 fTimeout =
new boost::posix_time::time_duration();
36 *
fTimeout = boost::posix_time::millisec((
int)(1000*timeout));
45 boost::lock_guard<boost::mutex> lock(*
fMutex);
55 boost::posix_time::ptime tNow
56 = boost::posix_time::microsec_clock::local_time();
67 boost::lock_guard<boost::mutex> lock(*
fMutex);
80 boost::lock_guard<boost::mutex> lock(*
fMutex);
error class with error type and description
QError SetTimeoutSec(double timeout)
virtual ~QWatchdogTimer()
QError TimeoutElapsed(bool &elapsed) const
boost::posix_time::time_duration * fTimeout
boost::posix_time::ptime * fLastStartTime