
Victor Whiskey Yankee
Now, how can I sleep if I am not inside a boost::thread? When I try that, I get this compile error:
error: 'boost::this_thread' has not been declared
You can't not be in a thread. And that error usually means a missing include.
You mean there is not a sleep function anywhere in boost but inside boost::thread? Wow...that's incredible disappointment.<br> Maybe with signals or condition variable by chance?<br>
How does one sleep in main that allows milliseconds and is cross-platform with linux and windows xp?
boost::this_thread::sleep works in all threads, including those not started
with boost::thread, such as main.
However, you need to include the right header:
#include