
----- Original Message ----- From: "Anthony Williams" <anthony.ajw@gmail.com> To: <boost@lists.boost.org> Sent: Friday, November 14, 2008 1:36 PM Subject: Re: [boost] [thread] sleep() with time_duration?
Boris <boriss@web.de> writes:
It would be nice if it was possible to pass a time_duration object to sleep() directly:
boost::thread::sleep(boost::posix_time::seconds(5));
boost::thread::sleep is only provided for backwards compatibility.
boost::this_thread::sleep has the absolute time/duration overloads you desire:
boost::this_thread::sleep(boost::posix_time::seconds(5));
The current proposal n2497 contains two overloadings http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html void boost::this_thread::sleep(const system_time& abs_t); template <class Duration> void boost::this_thread::sleep(const Duration& rel_t); Boost.Thread contains only the template <class Duration> void boost::this_thread::sleep(const Duration& rel_t); Could you add the other? Thanks, Vicente