【发布时间】:2012-04-12 22:06:14
【问题描述】:
我想在 boost 线程中等待 1.5 秒。使用 boost::xtime 我可以等待整数秒:
// Block on the queue / wait for data for up two seconds.
boost::xtime_get(&xt, boost::TIME_UTC);
xt.sec++;
xt.sec++;
....
_condition.timed_wait(_mutex, xt)
如何改为等待 1.5 秒?
【问题讨论】:
标签: c++ multithreading boost boost-thread