diff options
author | Richard Linden <none@none> | 2013-02-08 00:03:31 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-02-08 00:03:31 -0800 |
commit | e3700112f313f3570887047d5b56a661af0afac5 (patch) | |
tree | b60aec4150f4282649f9ceacb93b70df32aed5fe /indra/llcommon | |
parent | eb6c8959ca5b8b3c100114d4d659a48bb4d56b2c (diff) |
SH-3275 WIP interesting Update viewer metrics system to be more flexible
added debug output to BlockTimer
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llfasttimer.cpp | 8 | ||||
-rw-r--r-- | indra/llcommon/llfasttimer.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index e58c5c0f98..ba626bcc32 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 726db70fbe..edbcb896b3 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -71,6 +71,8 @@ public: BlockTimer(TimeBlock& timer); ~BlockTimer(); + LLUnit<LLUnits::Seconds, F64> getElapsedTime(); + private: U64 mStartTime; |