10 #include <boost/date_time/posix_time/posix_time.hpp>
11 #include <boost/thread.hpp>
19 boost::condition_variable
cond;
27 template <
typename duration_type>
28 bool P(duration_type
const& rel_time);
40 boost::mutex::scoped_lock lock(
mut);
50 boost::mutex::scoped_lock
const lock(
mut);
60 template <
typename duration_type>
63 boost::posix_time::ptime
const timeout = boost::posix_time::second_clock::universal_time() + rel_time;
65 boost::mutex::scoped_lock lock(
mut);
68 if(!
cond.timed_wait(lock, timeout))
79 boost::mutex::scoped_lock
const lock(
mut);