diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-10-12 13:22:58 -0700 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-10-12 13:22:58 -0700 |
commit | 4a1ef20c317897e7e509c7f599e97fcc90ffaefc (patch) | |
tree | c496bd8785b94bb60bca33ea59758c5929341451 /indra/llcommon/llfasttimer.h | |
parent | 895e8ad446ab383e1211f759e8b55aa0fff2efc1 (diff) | |
parent | d4b2897700c66354413af42ab055bd1aaa47f91c (diff) |
merge
Diffstat (limited to 'indra/llcommon/llfasttimer.h')
-rw-r--r-- | indra/llcommon/llfasttimer.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 0d89353dee..c2f23f6ff6 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -114,8 +114,9 @@ public: // recursive call to gather total time from children static void accumulateTimings(); - // called once per frame by LLFastTimer - static void processFrame(); + // updates cumulative times and hierarchy, + // can be called multiple times in a frame, at any point + static void processTimes(); static void buildHierarchy(); static void resetFrame(); @@ -178,8 +179,9 @@ public: { #if FAST_TIMER_ON NamedTimer::FrameState* frame_state = mFrameState; - frame_state->mLastStartTime = get_cpu_clock_count(); - mStartSelfTime = frame_state->mLastStartTime; + U64 cur_time = get_cpu_clock_count(); + frame_state->mLastStartTime = cur_time; + mStartSelfTime = cur_time; frame_state->mActiveCount++; frame_state->mCalls++; @@ -215,6 +217,10 @@ public: // call this once a frame to reset timers static void nextFrame(); + // dumps current cumulative frame stats to log + // call nextFrame() to reset timers + static void dumpCurTimes(); + // call this to reset timer hierarchy, averages, etc. static void reset(); |