本文整理汇总了C++中LLFrameTimer::setTimerExpirySec方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFrameTimer::setTimerExpirySec方法的具体用法?C++ LLFrameTimer::setTimerExpirySec怎么用?C++ LLFrameTimer::setTimerExpirySec使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFrameTimer
的用法示例。
在下文中一共展示了LLFrameTimer::setTimerExpirySec方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updatePerFrameStats
void LLPerfStats::updatePerFrameStats()
{
(void) LLStatsConfigFile::instance().checkAndReload();
static LLFrameTimer performance_stats_timer;
if ( frameStatsIsRunning() )
{
if ( mReportPerformanceStatInterval == 0 )
{ // Record info every frame
if ( mSkipFirstFrameStats )
{ // Skip the first time - was started this frame
mSkipFirstFrameStats = FALSE;
}
else
{
dumpIntervalPerformanceStats();
}
}
else
{
performance_stats_timer.setTimerExpirySec( getReportPerformanceInterval() );
if (performance_stats_timer.checkExpirationAndReset( mReportPerformanceStatInterval ))
{
dumpIntervalPerformanceStats();
}
}
if ( LLFrameTimer::getElapsedSeconds() > mReportPerformanceStatEnd )
{ // Reached end of time, clear it to stop reporting
setReportPerformanceDuration(0.f); // Don't set mReportPerformanceStatEnd directly
llinfos << "Recording performance stats completed" << llendl;
}
}
}
示例2: draw
void LLFloaterAvatarPicker::draw()
{
// sometimes it is hard to determine when Select/Ok button should be disabled (see LLAvatarActions::shareWithAvatars).
// lets check this via mOkButtonValidateSignal callback periodically.
static LLFrameTimer timer;
if (timer.hasExpired())
{
timer.setTimerExpirySec(0.33f); // three times per second should be enough.
// simulate list changes.
onList();
timer.start();
}
LLFloater::draw();
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
// TODO-RLVa: this code needs revisiting
if (rlv_handler_t::isEnabled())
{
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
if ( (pNearMePanel) && (childGetVisibleTab("ResidentChooserTabs") == pNearMePanel) )
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
if (mNearMeListComplete)
{
getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
childSetEnabled("Select", false);
}
mNearMeListComplete = FALSE;
pNearMePanel->setCtrlsEnabled(FALSE);
return;
}
pNearMePanel->setCtrlsEnabled(TRUE);
}
}
// [/RLVa:KB]
if (!mNearMeListComplete && getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
{
populateNearMe();
}
}
示例3: draw
void LLFloaterAvatarPicker::draw()
{
// sometimes it is hard to determine when Select/Ok button should be disabled (see LLAvatarActions::shareWithAvatars).
// lets check this via mOkButtonValidateSignal callback periodically.
static LLFrameTimer timer;
if (timer.hasExpired())
{
timer.setTimerExpirySec(0.33f); // three times per second should be enough.
// simulate list changes.
onList();
timer.start();
}
LLFloater::draw();
if (!mNearMeListComplete && getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
{
populateNearMe();
}
}