|
Boost : |
Subject: Re: [boost] [thread] sleep() with time_duration?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-11-14 17:56:52
----- Original Message -----
From: "Anthony Williams" <anthony.ajw_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, November 14, 2008 1:36 PM
Subject: Re: [boost] [thread] sleep() with time_duration?
>
> Boris <boriss_at_[hidden]> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk