boost::interprocess::message_queue::timed_receive, bug or mistake?

I'm using boost svn 50746 (latest at time of writing), on 32-bit
Ubuntu Intrepid Ibex, with gcc/g++ 4.3.2
This is a simple test case showing that for some reason,
message_queue::timed_receive is returning immediately for me, not
throwing an exception, but just returning false which signifies that
the timeout has been reached.
The output of the program is as follows:
Current time: 2009-Jan-23 17:40:29
After delay: 2009-Jan-23 17:40:34
Timeout at 2009-Jan-23 17:40:29
Note that the timeout occurs before it is supposed to, it returns instantly.
Is this a bug, or am I doing something wrong?
MINIMAL CODE:
#include <iostream>
#include

nacitar@ubercpp.com wrote:
I'm using boost svn 50746 (latest at time of writing), on 32-bit Ubuntu Intrepid Ibex, with gcc/g++ 4.3.2
This is a simple test case showing that for some reason, message_queue::timed_receive is returning immediately for me, not throwing an exception, but just returning false which signifies that the timeout has been reached.
The output of the program is as follows: Current time: 2009-Jan-23 17:40:29 After delay: 2009-Jan-23 17:40:34 Timeout at 2009-Jan-23 17:40:29
Use universal time instead of local time. Maybe this is not documented, and maybe this might be severe limitation. I've seen that boost::thread uses boost::system_time so maybe Interprocess should go this way. Regards, Ion

Ion Gaztañaga wrote:
Use universal time instead of local time. Maybe this is not documented, and maybe this might be severe limitation. I've seen that boost::thread uses boost::system_time so maybe Interprocess should go this way.
Boost thread's system time is universal time:
namespace boost
{
typedef boost::posix_time::ptime system_time;
inline system_time get_system_time()
{
return boost::date_time::microsec_clock
participants (2)
-
Ion Gaztañaga
-
nacitar@ubercpp.com