diff options
| author | Richard Linden <none@none> | 2012-10-09 18:05:32 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2012-10-09 18:05:32 -0700 |
| commit | f5852ff448c1467c08474061caef44bba3c06f55 (patch) | |
| tree | 21097056a11c1b4386eee7f91a266e89dd665457 /indra/llcommon/lltracerecording.cpp | |
| parent | 960f8764ad2407add941bc8650b295f1e77beb19 (diff) | |
| parent | aff9654c1115b4a74fc3ee8f9ca2c2ffa07f8d73 (diff) | |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
| -rw-r--r-- | indra/llcommon/lltracerecording.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index f0b17ef100..93d2136e7f 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -38,7 +38,6 @@ namespace LLTrace Recording::Recording() : mElapsedSeconds(0), - mIsStarted(false), mRates(new AccumulatorBuffer<RateAccumulator<F32> >()), mMeasurements(new AccumulatorBuffer<MeasurementAccumulator<F32> >()), mStackTimers(new AccumulatorBuffer<TimerAccumulator>()) @@ -47,13 +46,7 @@ Recording::Recording() Recording::~Recording() {} -void Recording::start() -{ - reset(); - resume(); -} - -void Recording::reset() +void Recording::handleReset() { mRates.write()->reset(); mMeasurements.write()->reset(); @@ -73,24 +66,22 @@ void Recording::update() } } -void Recording::resume() +void Recording::handleStart() { - if (!mIsStarted) - { mSamplingTimer.reset(); LLTrace::get_thread_recorder()->activate(this); - mIsStarted = true; - } } -void Recording::stop() -{ - if (mIsStarted) +void Recording::handleStop() { mElapsedSeconds += mSamplingTimer.getElapsedTimeF64(); LLTrace::get_thread_recorder()->deactivate(this); - mIsStarted = false; } + +void Recording::handleSplitTo(Recording& other) +{ + stop(); + other.restart(); } |
