summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfasttimer_class.cpp
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2011-09-14 10:51:00 -0700
committerRichard Nelson <richard@lindenlab.com>2011-09-14 10:51:00 -0700
commit088f04d9c1f5f6e2b0613a9f3ed4d26e7b9210bf (patch)
tree5021691b5296f06afd500b1eb1731d254fc297dd /indra/llcommon/llfasttimer_class.cpp
parent7f11cff7972e914d4cb15f72d015100fab3ce212 (diff)
parent8b7c07651c4e2c57e06c283243b30e03da327b42 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience
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++;