summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfasttimer_class.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-09-21 14:25:48 -0700
committerMerov Linden <merov@lindenlab.com>2011-09-21 14:25:48 -0700
commit5ae6bbc848e0146bb4b5ea5dd4a5d26d2c5702ba (patch)
treecfd1c052aef51bfa95298613a95fc78f64c3aefc /indra/llcommon/llfasttimer_class.cpp
parent7bc6e626f40a910b4a3e5b88161e96b9967bd24d (diff)
parent305b65f6f600b81de9a78e1246d2a5353cc3189b (diff)
EXP-1207 : merge with viewer-experience-fui
Diffstat (limited to 'indra/llcommon/llfasttimer_class.cpp')
-rw-r--r--indra/llcommon/llfasttimer_class.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp
index ebb5961c91..463f558c2c 100644
--- a/indra/llcommon/llfasttimer_class.cpp
+++ b/indra/llcommon/llfasttimer_class.cpp
@@ -303,14 +303,15 @@ LLFastTimer::NamedTimer::~NamedTimer()
std::string LLFastTimer::NamedTimer::getToolTip(S32 history_idx)
{
+ F64 ms_multiplier = 1000.0 / (F64)LLFastTimer::countsPerSecond();
if (history_idx < 0)
{
- // by default, show average number of calls
- return llformat("%s (%d calls)", getName().c_str(), (S32)getCallAverage());
+ // by default, show average number of call
+ return llformat("%s (%d ms, %d calls)", getName().c_str(), (S32)(getCountAverage() * ms_multiplier), (S32)getCallAverage());
}
else
{
- return llformat("%s (%d calls)", getName().c_str(), (S32)getHistoricalCalls(history_idx));
+ return llformat("%s (%d ms, %d calls)", getName().c_str(), (S32)(getHistoricalCount(history_idx) * ms_multiplier), (S32)getHistoricalCalls(history_idx));
}
}
@@ -693,17 +694,7 @@ void LLFastTimer::nextFrame()
llinfos << "Slow frame, fast timers inaccurate" << llendl;
}
- if (sPauseHistory)
- {
- sResetHistory = true;
- }
- else if (sResetHistory)
- {
- sLastFrameIndex = 0;
- sCurFrameIndex = 0;
- sResetHistory = false;
- }
- else // not paused
+ if (!sPauseHistory)
{
NamedTimer::processTimes();
sLastFrameIndex = sCurFrameIndex++;