本文整理汇总了C++中Timeval::future方法的典型用法代码示例。如果您正苦于以下问题:C++ Timeval::future方法的具体用法?C++ Timeval::future怎么用?C++ Timeval::future使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timeval
的用法示例。
在下文中一共展示了Timeval::future方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serviceLoop
void NewPager::serviceLoop()
{
Timeval nextTime;
while (! gBTS.btsShutdown()) {
// Wait for pending activity to clear PCH.
if (unsigned load = gPagingQ.getPagingLoad()) {
LOG(DEBUG) << "Pager waiting with load " << load;
sleepFrames(51); // There could be multiple paging channels, in which case this is longer than necessary, but no matter.
continue;
}
// nextTime controls how quickly we resend pages.
if (! nextTime.passed()) {
sleepFrames(51);
continue;
}
newPageAll();
nextTime.future(5000); // Wait 5 seconds between paging sets.
}
}