diff options
author | Richard Nelson <none@none> | 2010-08-13 16:00:14 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-08-13 16:00:14 -0700 |
commit | e427c671f036de1addf90fa9a2ed09035b099392 (patch) | |
tree | 16e59e1bf81a25002125bcd0e53a84017a9826ac /indra | |
parent | 143bf98d7356d0424eac114cbf35e8738410ed5e (diff) |
fixed fast timer average frame time rollover error
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llfasttimer_class.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp index dfbae09864..e9ac709254 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer_class.cpp @@ -474,9 +474,9 @@ void LLFastTimer::NamedTimer::accumulateTimings() int hidx = cur_frame % HISTORY_NUM; timerp->mCountHistory[hidx] = timerp->mTotalTimeCounter; - timerp->mCountAverage = (timerp->mCountAverage * cur_frame + timerp->mTotalTimeCounter) / (cur_frame+1); + timerp->mCountAverage = ((U64)timerp->mCountAverage * cur_frame + timerp->mTotalTimeCounter) / (cur_frame+1); timerp->mCallHistory[hidx] = timerp->getFrameState().mCalls; - timerp->mCallAverage = (timerp->mCallAverage * cur_frame + timerp->getFrameState().mCalls) / (cur_frame+1); + timerp->mCallAverage = ((U64)timerp->mCallAverage * cur_frame + timerp->getFrameState().mCalls) / (cur_frame+1); } } } |