|
Boost : |
Subject: Re: [boost] [thread] boost::this_thread::sleep broken?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-01-02 00:19:51
AMDG
On 12/24/2010 6:06 PM, Jamie Allsop wrote:
> From the docs I'd expect to be able to write this:
>
> std::cout
> << "Time Before Sleep: "
> << boost::posix_time::microsec_clock::local_time()
> << std::endl;
>
> boost::this_thread::sleep( boost::posix_time::seconds(10) );
>
> std::cout
> << "Time After Sleep : "
> << boost::posix_time::microsec_clock::local_time()
> << std::endl;
>
> and have the 'this' thread sleep for approximately 10 seconds. Instead
> sleep returns instantaneously:
>
> Time Before Sleep: 2010-Dec-25 01:38:50.949160000
> Time After Sleep : 2010-Dec-25 01:38:50.949436000
>
> I've tried this with boost 1.45 and boost 1.43 using gcc 4.4 on debian
> x86_64. Am I missing something obvious?
The code works for me with 32-bit on both Linux and Windows.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk