Skip to content
Snippets Groups Projects
Commit 584d0ac6 authored by Richard Nelson's avatar Richard Nelson
Browse files

LLFastTimer::dumpCurTimes() now gives accurate times mid-frame

reviewed by Brad
parent ec84b639
No related branches found
No related tags found
No related merge requests found
...@@ -114,8 +114,9 @@ class LLFastTimer ...@@ -114,8 +114,9 @@ class LLFastTimer
// recursive call to gather total time from children // recursive call to gather total time from children
static void accumulateTimings(); static void accumulateTimings();
// called once per frame by LLFastTimer // updates cumulative times and hierarchy,
static void processFrame(); // can be called multiple times in a frame, at any point
static void processTimes();
static void buildHierarchy(); static void buildHierarchy();
static void resetFrame(); static void resetFrame();
...@@ -178,8 +179,9 @@ class LLFastTimer ...@@ -178,8 +179,9 @@ class LLFastTimer
{ {
#if FAST_TIMER_ON #if FAST_TIMER_ON
NamedTimer::FrameState* frame_state = mFrameState; NamedTimer::FrameState* frame_state = mFrameState;
frame_state->mLastStartTime = get_cpu_clock_count(); U64 cur_time = get_cpu_clock_count();
mStartSelfTime = frame_state->mLastStartTime; frame_state->mLastStartTime = cur_time;
mStartSelfTime = cur_time;
frame_state->mActiveCount++; frame_state->mActiveCount++;
frame_state->mCalls++; frame_state->mCalls++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment