17 Apr
2008
17 Apr
'08
10:47 a.m.
Johan Råde wrote:
I want to do a timed join, with a relative time of 0.1s. I can not figure out from the docs how to do this. I find the prototypes somewhat mystifying:
bool timed_join(const system_time& wait_until);
template<typename TimeDuration> bool timed_join(TimeDuration const& rel_time);
What is system_time? What should TimeDuration be?
I'm using Windows.
Thank you, Johan Råde
I figured out the answer myself: int n = (int)boost::posix_time::time_duration::ticks_per_second() / 10; boost::posix_time::time_duration delay(0,0,0,n); thr.timed_join(delay); I bit more complex than I had expected. --Johan