summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-10-09 18:05:32 -0700
committerRichard Linden <none@none>2012-10-09 18:05:32 -0700
commitf5852ff448c1467c08474061caef44bba3c06f55 (patch)
tree21097056a11c1b4386eee7f91a266e89dd665457 /indra/llcommon/lltracerecording.cpp
parent960f8764ad2407add941bc8650b295f1e77beb19 (diff)
parentaff9654c1115b4a74fc3ee8f9ca2c2ffa07f8d73 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp25
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();
}