8 Jan
2010
8 Jan
'10
5:58 p.m.
Using Boost 1.41, MSVC 2005, Win 7 x64 (compiling 32-bit). I was trying to set a small delay in a loop, so the loop doesn't consume all of the processor, using boost::thread::sleep(). I tried using the example from the threading documentation (http://www.boost.org/doc/libs/1_41_0/doc/html/thread/time.html#thread.time. get_system_time): boost::thread::sleep(boost::posix_time::milliseconds(25)); I keep getting a compiler error from the line above. Error 2 error C2664: 'boost::thread::sleep' : cannot convert parameter 1 from 'boost::date_time::subsecond_duration<base_duration,frac_of_second>' to 'const boost::system_time &' Is there something else I need to be doing to make this work? -Rob Yull