当前位置: 首页>>代码示例>>C++>>正文


C++ LLFrameTimer::setTimerExpirySec方法代码示例

本文整理汇总了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;
		}
	}
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:33,代码来源:llstat.cpp

示例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();
	}
}
开发者ID:aragornarda,项目名称:SingularityViewer,代码行数:44,代码来源:llfloateravatarpicker.cpp

示例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();
	}
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:20,代码来源:llfloateravatarpicker.cpp


注:本文中的LLFrameTimer::setTimerExpirySec方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。