LLFrameTimer Class Reference

#include <llframetimer.h>

List of all members.

Public Member Functions

 LLFrameTimer ()
void start ()
void stop ()
void reset ()
void resetWithExpiry (F32 expiration)
void pause ()
void unpause ()
void setTimerExpirySec (F32 expiration)
void setExpiryAt (F64 seconds_since_epoch)
BOOL checkExpirationAndReset (F32 expiration)
F32 getElapsedTimeAndResetF32 ()
void setAge (const F64 age)
BOOL hasExpired () const
F32 getTimeToExpireF32 () const
F32 getElapsedTimeF32 () const
BOOL getStarted () const
F64 expiresAt () const

Static Public Member Functions

static F64 getElapsedSeconds ()
static U64 getTotalTime ()
static F64 getTotalSeconds ()
static void updateFrameTime ()
static S32 getFrameCount ()
static F32 getFrameDeltaTimeF32 ()

Protected Attributes

F64 mStartTime
F64 mExpiry
BOOL mStarted

Static Protected Attributes

static U64 sStartTotalTime = totalTime()
static F64 sFrameTime = 0.0
static U64 sFrameDeltaTime = 0
static U64 sTotalTime = 0
static F64 sTotalSeconds = 0.0
static S32 sFrameCount = 0


Detailed Description

*NOTE: Because of limitations on linux which we do not really have time to explore, the total time is derived from the frame time and is recsynchronized on every frame.

Definition at line 45 of file llframetimer.h.


Constructor & Destructor Documentation

LLFrameTimer::LLFrameTimer (  )  [inline]

Definition at line 48 of file llframetimer.h.


Member Function Documentation

BOOL LLFrameTimer::checkExpirationAndReset ( F32  expiration  ) 

Definition at line 122 of file llframetimer.cpp.

References FALSE, hasExpired(), reset(), setTimerExpirySec(), and TRUE.

Referenced by check_offer_throttle(), LLCacheName::processPending(), and LLAudioEngine_FMOD::updateWind().

F64 LLFrameTimer::expiresAt (  )  const

Definition at line 115 of file llframetimer.cpp.

References mExpiry, sStartTotalTime, U64_to_F64(), and USEC_TO_SEC_F64.

static F64 LLFrameTimer::getElapsedSeconds (  )  [inline, static]

Definition at line 52 of file llframetimer.h.

References sFrameTime.

Referenced by LLStat::addValue(), LLDebugVarMessageBox::draw(), LLViewerObject::dump(), LLVOAvatar::idleUpdate(), LLViewerObject::LLViewerObject(), process_chat_from_simulator(), LLViewerObject::processUpdateMessage(), LLStatusBar::refresh(), LLSelectNode::renderOneSilhouette(), send_stats(), LLDrawPoolWater::shade(), LLStat::start(), and LLViewerObjectList::update().

F32 LLFrameTimer::getElapsedTimeAndResetF32 (  )  [inline]

Definition at line 87 of file llframetimer.h.

References mStartTime, reset(), sFrameTime, and t.

Referenced by LLViewerTextureAnim::animateTextures(), LLMetricsImpl::printTotals(), LLDrawPoolTerrain::renderFull4TUShader(), LLMotionController::setTimeFactor(), LLAgent::updateCamera(), LLCriticalDamp::updateInterpolants(), and LLViewerPartSim::updateSimulation().

F32 LLFrameTimer::getElapsedTimeF32 (  )  const [inline]

Definition at line 94 of file llframetimer.h.

References mStarted, mStartTime, and sFrameTime.

Referenced by LLViewerTextureAnim::animateTextures(), LLFolderView::autoOpenTest(), LLInventoryModel::backgroundFetch(), LLLiveFile::Impl::check(), LLCurrencyUIManager::Impl::considerUpdateCurrency(), display(), LLStatGraph::draw(), LLStatBar::draw(), LLProgressView::draw(), LLPanelDirBrowser::draw(), LLNetMap::draw(), LLMenuHolderGL::draw(), LLPieMenu::draw(), LLLineEditor::draw(), LLFloaterIMPanel::draw(), LLHoverView::draw(), LLFolderView::draw(), LLFloaterWorldMap::draw(), LLSnapshotLivePreview::draw(), LLFloaterGodTools::draw(), LLFastTimerView::draw(), LLButton::draw(), LLTextEditor::drawCursor(), LLScrollListCtrl::drawItems(), LLMemoryView::dumpData(), LLAgent::fidget(), LLJoystick::getElapsedHeldDownTime(), LLTextureFetch::getFetchState(), LLFocusMgr::getFocusTime(), LLButton::getHeldDownTime(), LLVoiceClient::getIsSpeaking(), LLAgent::getRenderState(), LLFolderView::getSelectionFadeElapsedTime(), LLAgent::getTypingTime(), LLToolBar::handleDragAndDrop(), LLTabContainer::handleDragAndDrop(), LLPieMenu::handleHover(), LLLineEditor::handleHover(), LLButton::handleHover(), LLModalDialog::handleKeyHere(), LLViewerWindow::handleMouseMove(), LLViewerWindow::handlePerFrameHover(), LLPieMenu::handleRightMouseUp(), LLViewerWindow::handleTranslatedKeyDown(), LLScrollListCtrl::handleUnicodeCharHere(), LLFolderView::handleUnicodeCharHere(), idle(), idle_afk_check(), idle_startup(), LLVOTextBubble::idleUpdate(), LLVOAvatar::idleUpdate(), LLViewerParcelOverlay::idleUpdate(), LLAudioSource::isDone(), LLUserOperation::isExpired(), LLEyeMotion::onUpdate(), LLHUDEffectPointAt::packData(), LLHUDEffectLookAt::packData(), LLMotionController::pause(), LLChatBar::refresh(), LLHUDEffectSpiral::render(), LLHUDEffectBeam::render(), LLHUDIcon::renderIcon(), LLViewerParcelMgr::renderParcelCollision(), LLManipTranslate::renderSnapGuides(), LLManipScale::renderSnapGuides(), send_stats(), LLTextureFetch::sendRequestListToSimulators(), LLHUDEffectLookAt::setLookAt(), LLHUDEffectPointAt::setPointAt(), LLSpeakerMgr::speakerChatted(), LLAgent::startTyping(), LLGestureManager::stepGesture(), LLMotionController::stopMotionInstance(), LLHUDEffectSpiral::triggerLocal(), LLHUDEffectBeam::unpackData(), LLTextureFetch::update(), LLHUDEffectPointAt::update(), LLHUDEffectLookAt::update(), LLSpeakerMgr::update(), LLEventNotifier::update(), LLAgent::updateCamera(), LLScriptEdCore::updateDynamicHelp(), LLViewerThrottle::updateDynamicThrottle(), LLSelectMgr::updateEffects(), LLViewerImage::updateFetch(), LLHoverView::updateHover(), LLMotionController::updateMotion(), LLVOAvatar::updateRegion(), LLVOVolume::updateTextures(), and LLVOAvatar::updateVisibility().

static S32 LLFrameTimer::getFrameCount (  )  [inline, static]

Definition at line 73 of file llframetimer.h.

References sFrameCount.

Referenced by LLButton::handleHover(), LLButton::handleMouseDown(), and LLViewerObject::updateDrawable().

F32 LLFrameTimer::getFrameDeltaTimeF32 (  )  [static]

Definition at line 139 of file llframetimer.cpp.

References sFrameDeltaTime, U64_to_F64(), and USEC_TO_SEC_F64.

Referenced by LLScrollableContainerView::draw(), and LLScrollableContainerView::handleDragAndDrop().

BOOL LLFrameTimer::getStarted (  )  const [inline]

Definition at line 95 of file llframetimer.h.

References mStarted.

Referenced by LLFolderView::autoOpenTest(), LLProgressView::draw(), LLMenuHolderGL::draw(), LLPieMenu::draw(), LLFloaterWorldMap::draw(), LLSnapshotLivePreview::draw(), LLAlertDialog::draw(), LLPieMenu::handleHover(), LLButton::handleHover(), LLPieMenu::handleMouseUp(), LLPieMenu::handleRightMouseUp(), LLSnapshotLivePreview::onIdle(), open_offer(), LLChatBar::refresh(), LLScriptEdCore::updateDynamicHelp(), and LLHUDText::updateSize().

F32 LLFrameTimer::getTimeToExpireF32 (  )  const [inline]

Definition at line 93 of file llframetimer.h.

References mExpiry, and sFrameTime.

static F64 LLFrameTimer::getTotalSeconds (  )  [inline, static]

Definition at line 65 of file llframetimer.h.

References sTotalSeconds.

Referenced by LLRunner::addRunnable(), LLVoiceVisualizer::LLVoiceVisualizer(), LLVoiceVisualizer::render(), and LLRunner::run().

static U64 LLFrameTimer::getTotalTime (  )  [inline, static]

Definition at line 59 of file llframetimer.h.

References sTotalTime, and totalTime().

Referenced by LLMessageThrottle::addAgentAlert(), LLMessageThrottle::addViewerAlert(), LLStatAccum::impl::getCurrentUsecs(), LLKeyThrottleImpl< T >::getTime(), and LLMessageThrottle::pruneEntries().

BOOL LLFrameTimer::hasExpired (  )  const [inline]

Definition at line 92 of file llframetimer.h.

References mExpiry, and sFrameTime.

Referenced by check_offer_throttle(), checkExpirationAndReset(), LLPreviewTexture::draw(), LLAlertDialog::draw(), LLViewerInventoryCategory::fetchDescendents(), LLLineEditor::handleHover(), LLSnapshotLivePreview::onIdle(), and LLStatusBar::refresh().

void LLFrameTimer::pause (  ) 

Definition at line 90 of file llframetimer.cpp.

References FALSE, mStarted, mStartTime, and sFrameTime.

Referenced by LLViewerWindow::handleFocusLost().

void LLFrameTimer::reset (  ) 

Definition at line 70 of file llframetimer.cpp.

References mExpiry, mStartTime, and sFrameTime.

Referenced by LLVOAvatar::addChat(), LLInventoryModel::backgroundFetch(), LLHoverView::cancelHover(), LLLiveFile::Impl::check(), checkExpirationAndReset(), LLAgent::clearAFK(), LLCurrencyUIManager::Impl::currencyKey(), display(), LLTextureFetchWorker::doWork(), LLStatGraph::draw(), LLStatBar::draw(), LLNetMap::draw(), LLMemoryView::dumpData(), LLViewerInventoryCategory::fetchDescendents(), getElapsedTimeAndResetF32(), LLViewerTextEditor::handleDoubleClick(), LLTextEditor::handleDoubleClick(), LLLineEditor::handleDoubleClick(), LLToolBar::handleDragAndDrop(), LLViewerTextEditor::handleHover(), LLTextEditor::handleHover(), LLLineEditor::handleHover(), LLTextEditor::handleKeyHere(), LLScrollListCtrl::handleKeyHere(), LLLineEditor::handleKeyHere(), LLFolderView::handleKeyHere(), LLViewerWindow::handleMouseDown(), LLViewerTextEditor::handleMouseDown(), LLTextEditor::handleMouseDown(), LLLineEditor::handleMouseDown(), LLJoystick::handleMouseDown(), LLManipTranslate::handleMouseDownOnPart(), LLManipScale::handleMouseDownOnPart(), LLViewerWindow::handleMouseMove(), LLViewerWindow::handleMouseUp(), LLViewerTextEditor::handleMouseUp(), LLTextEditor::handleMouseUp(), LLLineEditor::handleMouseUp(), LLButton::handleMouseUp(), LLViewerWindow::handleRightMouseUp(), LLViewerWindow::handleScrollWheel(), LLTextEditor::handleUnicodeCharHere(), LLScrollListCtrl::handleUnicodeCharHere(), LLLineEditor::handleUnicodeCharHere(), LLFolderView::handleUnicodeCharHere(), LLAgent::heardChat(), idle(), idle_startup(), LLVOAvatar::idleUpdate(), LLViewerParcelOverlay::idleUpdate(), LLTextureFetchWorker::insertPacket(), LLLineEditor::LLLineEditor(), LLMemoryView::LLMemoryView(), LLViewerInventoryCategory::LLViewerInventoryCategory(), LLVoiceVisualizer::LLVoiceVisualizer(), LLVOSky::LLVOSky(), LLButton::onMouseCaptureLost(), LLEyeMotion::onUpdate(), LLVoiceClient::participantPropertiesEvent(), LLAudioSource::play(), LLViewerParcelMgr::processParcelProperties(), LLViewerImageList::receiveImageHeader(), LLViewerImageList::receiveImagePacket(), LLViewerTextureAnim::reset(), LLMultiGesture::reset(), resetWithExpiry(), LLHUDIcon::restartLifeTimer(), LLViewerWindow::restoreGL(), LLGestureManager::runStep(), LLFloaterGodTools::sendRegionInfoRequest(), LLStatusBar::setBalance(), LLTextEditor::setFocus(), LLLineEditor::setFocus(), LLStatusBar::setHealth(), LLHoverView::setHoverActive(), LLFocusMgr::setKeyboardFocus(), LLFolderView::setShowSingleSelection(), LLPumpIO::LLChainInfo::setTimeoutSeconds(), LLFloaterIMPanel::setTyping(), start(), LLVOAvatar::startAppearanceAnimation(), LLAgent::startCameraAnimation(), LLAudioEngine::startNextTransfer(), LLVOAvatar::startTyping(), LLAgent::startTyping(), LLFocusMgr::triggerFocusFlash(), LLMotionController::unpause(), LLTextureFetch::update(), LLEventNotifier::update(), LLAudioChannel::updateBuffer(), LLVOAvatar::updateCharacter(), LLViewerThrottle::updateDynamicThrottle(), LLSelectMgr::updateEffects(), LLHoverView::updateHover(), LLVOAvatar::updateRegion(), LLVOSky::updateSky(), LLVOVolume::updateTextures(), and LLVOAvatar::updateVisibility().

void LLFrameTimer::resetWithExpiry ( F32  expiration  ) 

Definition at line 76 of file llframetimer.cpp.

References reset(), and setTimerExpirySec().

Referenced by LLSpeaker::LLSpeaker().

void LLFrameTimer::setAge ( const F64  age  )  [inline]

Definition at line 89 of file llframetimer.h.

References mStartTime, and sFrameTime.

Referenced by LLMotionController::unpause().

void LLFrameTimer::setExpiryAt ( F64  seconds_since_epoch  ) 

Definition at line 109 of file llframetimer.cpp.

References mExpiry, mStartTime, sFrameTime, sStartTotalTime, and USEC_TO_SEC_F64.

void LLFrameTimer::setTimerExpirySec ( F32  expiration  ) 

Definition at line 104 of file llframetimer.cpp.

References mExpiry, and mStartTime.

Referenced by checkExpirationAndReset(), LLViewerInventoryCategory::fetchDescendents(), LLLineEditor::handleHover(), LLPumpIO::LLChainInfo::LLChainInfo(), LLSnapshotLivePreview::LLSnapshotLivePreview(), LLLandmark::processRegionIDAndHandle(), resetWithExpiry(), LLStatusBar::setBalance(), LLStatusBar::setHealth(), LLPumpIO::LLChainInfo::setTimeoutSeconds(), LLAlertDialog::show(), and LLSnapshotLivePreview::updateSnapshot().

void LLFrameTimer::start (  ) 

Definition at line 59 of file llframetimer.cpp.

References mStarted, reset(), and TRUE.

Referenced by LLFolderView::autoOpenTest(), LLFloaterWorldMap::draw(), LLSnapshotLivePreview::draw(), LLButton::handleMouseDown(), LLPieMenu::handleMouseUp(), LLSnapshotLivePreview::LLSnapshotLivePreview(), LLMenuHolderGL::setActivatedItem(), LLAgent::setAFK(), LLTabContainerCommon::setDragAndDropDelayTimer(), LLPumpIO::LLChainInfo::setTimeoutSeconds(), LLProgressView::setVisible(), LLMenuGL::setVisible(), LLPieMenu::show(), LLAlertDialog::show(), LLScriptEdCore::updateDynamicHelp(), LLHUDText::updateSize(), and LLSnapshotLivePreview::updateSnapshot().

void LLFrameTimer::stop (  ) 

Definition at line 65 of file llframetimer.cpp.

References FALSE, and mStarted.

Referenced by LLFolderView::autoOpenTest(), LLFolderView::closeAutoOpenedFolders(), LLFloaterWorldMap::draw(), LLSnapshotLivePreview::draw(), LLAlertDialog::draw(), LLTabContainer::handleDragAndDrop(), LLButton::handleMouseUp(), LLPieMenu::handleRightMouseDown(), LLButton::init(), LLFolderView::LLFolderView(), LLMenuGL::LLMenuGL(), LLMenuHolderGL::LLMenuHolderGL(), LLProgressView::LLProgressView(), LLTabContainerCommon::LLTabContainerCommon(), LLSnapshotLivePreview::onIdle(), LLButton::onMouseCaptureLost(), LLFloaterWorldMap::postBuild(), LLChatBar::refresh(), LLPumpIO::LLChainInfo::setTimeoutSeconds(), LLProgressView::setVisible(), LLMenuGL::setVisible(), LLPieMenu::show(), LLScriptEdCore::updateDynamicHelp(), LLHUDText::updateSize(), and LLSnapshotLivePreview::updateSnapshot().

void LLFrameTimer::unpause (  ) 

Definition at line 97 of file llframetimer.cpp.

References mStarted, mStartTime, sFrameTime, and TRUE.

Referenced by LLViewerWindow::handleFocus().

void LLFrameTimer::updateFrameTime (  )  [static]

Definition at line 49 of file llframetimer.cpp.

References sFrameCount, sFrameDeltaTime, sFrameTime, sStartTotalTime, sTotalSeconds, sTotalTime, totalTime(), U64_to_F64(), and USEC_TO_SEC_F64.

Referenced by tut::frametimer_test::frametimer_test(), idle(), tut::pipe_and_pump_fitness::pipe_and_pump_fitness(), pump_loop(), and LLApp::stepFrame().


Member Data Documentation

F64 LLFrameTimer::mExpiry [protected]

Definition at line 140 of file llframetimer.h.

Referenced by expiresAt(), getTimeToExpireF32(), hasExpired(), reset(), setExpiryAt(), and setTimerExpirySec().

BOOL LLFrameTimer::mStarted [protected]

Definition at line 144 of file llframetimer.h.

Referenced by getElapsedTimeF32(), getStarted(), pause(), start(), stop(), and unpause().

F64 LLFrameTimer::mStartTime [protected]

Definition at line 137 of file llframetimer.h.

Referenced by getElapsedTimeAndResetF32(), getElapsedTimeF32(), pause(), reset(), setAge(), setExpiryAt(), setTimerExpirySec(), and unpause().

S32 LLFrameTimer::sFrameCount = 0 [static, protected]

Definition at line 129 of file llframetimer.h.

Referenced by getFrameCount(), and updateFrameTime().

U64 LLFrameTimer::sFrameDeltaTime = 0 [static, protected]

Definition at line 120 of file llframetimer.h.

Referenced by getFrameDeltaTimeF32(), and updateFrameTime().

F64 LLFrameTimer::sFrameTime = 0.0 [static, protected]

Definition at line 117 of file llframetimer.h.

Referenced by getElapsedSeconds(), getElapsedTimeAndResetF32(), getElapsedTimeF32(), getTimeToExpireF32(), hasExpired(), pause(), reset(), setAge(), setExpiryAt(), unpause(), and updateFrameTime().

U64 LLFrameTimer::sStartTotalTime = totalTime() [static, protected]

Definition at line 110 of file llframetimer.h.

Referenced by expiresAt(), setExpiryAt(), and updateFrameTime().

F64 LLFrameTimer::sTotalSeconds = 0.0 [static, protected]

Definition at line 126 of file llframetimer.h.

Referenced by getTotalSeconds(), and updateFrameTime().

U64 LLFrameTimer::sTotalTime = 0 [static, protected]

Definition at line 123 of file llframetimer.h.

Referenced by getTotalTime(), and updateFrameTime().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:22 2010 for Second Life Viewer by  doxygen 1.4.7