summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-02-08 00:04:20 -0800
committerRichard Linden <none@none>2013-02-08 00:04:20 -0800
commit87f04a6dcc7881a3cbd7677ab0e0aface379b13d (patch)
treee7cea5ae7c143c0baf655f66b287eab752cc19df /indra/llcommon
parent438cbfe489cc34261ac600bbb22983164e59b1d9 (diff)
parente3700112f313f3570887047d5b56a661af0afac5 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting-metrics
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llfasttimer.cpp8
-rw-r--r--indra/llcommon/llfasttimer.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index 809a0ef4bf..4387218f5a 100644
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -434,4 +434,12 @@ void TimeBlockAccumulator::reset( const TimeBlockAccumulator* other )
}
}
+LLUnit<LLUnits::Seconds, F64> BlockTimer::getElapsedTime()
+{
+ U64 total_time = TimeBlock::getCPUClockCount64() - mStartTime;
+
+ return (F64)total_time / (F64)TimeBlock::countsPerSecond();
+}
+
+
} // namespace LLTrace
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index 9402bb7267..2994b35e58 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -71,7 +71,7 @@ public:
BlockTimer(TimeBlock& timer);
~BlockTimer();
- void logCurrentTime();
+ LLUnit<LLUnits::Seconds, F64> getElapsedTime();
private: