diff options
| author | Richard Nelson <richard@lindenlab.com> | 2009-10-07 21:17:28 +0000 | 
|---|---|---|
| committer | Richard Nelson <richard@lindenlab.com> | 2009-10-07 21:17:28 +0000 | 
| commit | 584d0ac64e973da3a9096fb85b796716255988be (patch) | |
| tree | eecb60842c00d9b7423777ad09c061feff9f0691 /indra/llcommon | |
| parent | ec84b639ed71c1dac8457867148d8aea6d595685 (diff) | |
LLFastTimer::dumpCurTimes() now gives accurate times mid-frame
reviewed by Brad
Diffstat (limited to 'indra/llcommon')
| -rw-r--r-- | indra/llcommon/llfasttimer.h | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index c6aa5f2195..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++; | 
