本文整理汇总了C++中TTimer::killTimer方法的典型用法代码示例。如果您正苦于以下问题:C++ TTimer::killTimer方法的具体用法?C++ TTimer::killTimer怎么用?C++ TTimer::killTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTimer
的用法示例。
在下文中一共展示了TTimer::killTimer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeAllTempTimers
void TimerUnit::removeAllTempTimers()
{
mCleanupList.clear();
for(auto it = mTimerRootNodeList.begin(); it != mTimerRootNodeList.end(); it++)
{
TTimer * pChild = *it;
if( pChild->isTempTimer() )
{
pChild->killTimer();
pChild->mOK_code = false; //important to not crash on stale Lua function args
markCleanup( pChild );
}
}
}
示例2: killTimer
bool TimerUnit::killTimer(const QString & name )
{
for(auto it = mTimerRootNodeList.begin(); it != mTimerRootNodeList.end(); it++)
{
TTimer * pChild = *it;
if( pChild->getName() == name )
{
// only temporary timers can be killed
if( ! pChild->isTempTimer() ) return false;
pChild->killTimer();
markCleanup( pChild );
return true;
}
}
return false;
}
示例3: removeAllTempTimers
void TimerUnit::removeAllTempTimers()
{
//qDebug()<<"vorher: TIMERS: insgesamt:"<<mTimerRootNodeList.size()<<" cleanup:"<<mCleanupList.size();
mCleanupList.clear();
typedef list<TTimer *>::const_iterator I;
for( I it = mTimerRootNodeList.begin(); it != mTimerRootNodeList.end(); it++)
{
TTimer * pChild = *it;
if( pChild->isTempTimer() )
{
pChild->killTimer();
pChild->mOK_code = false; //important to not crash on stale Lua function args
markCleanup( pChild );
}
}
//qDebug()<<"TIMERS: insgesamt:"<<mTimerRootNodeList.size()<<" cleanup:"<<mCleanupList.size();
}
示例4: killTimer
bool TimerUnit::killTimer( QString & name )
{
//qDebug()<<"TimerUnit::killTimer() name="<<name;
typedef list<TTimer *>::const_iterator I;
for( I it = mTimerRootNodeList.begin(); it != mTimerRootNodeList.end(); it++)
{
TTimer * pChild = *it;
if( pChild->getName() == name )
{
// only temporary timers can be killed
if( ! pChild->isTempTimer() ) return false;
pChild->killTimer();
markCleanup( pChild );
return true;
}
}
return false;
}