diff options
| author | Richard Linden <none@none> | 2013-08-12 20:08:18 -0700 | 
|---|---|---|
| committer | Richard Linden <none@none> | 2013-08-12 20:08:18 -0700 | 
| commit | b39cf4770b6d73de51b0ed451139bb4502f396c8 (patch) | |
| tree | 2bc7ee5889f619a86575e5b47d8e5dca42e98442 | |
| parent | b8d49dab9afddf196618d66b1a409cdf7d2d53ba (diff) | |
Backed out changeset: ed09997b4652
| -rwxr-xr-x | indra/newview/llappviewer.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llappviewer.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llstartup.cpp | 5 | ||||
| -rwxr-xr-x | indra/newview/llviewerobjectlist.cpp | 5 | ||||
| -rwxr-xr-x | indra/newview/llviewerstats.cpp | 2 | 
5 files changed, 8 insertions, 10 deletions
| diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 30c19ac55e..0a1a78c5b4 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -294,7 +294,7 @@ U32 gForegroundFrameCount = 0; // number of frames that app window was in foregr  LLPumpIO* gServicePump = NULL;  LLUnitImplicit<U64, LLUnits::Microseconds> gFrameTime = 0; -F32 gFrameTimeSeconds = 0.f; +LLUnitImplicit<F32, LLUnits::Seconds> gFrameTimeSeconds = 0.f;  LLUnitImplicit<F32, LLUnits::Seconds> gFrameIntervalSeconds = 0.f;  F32 gFPSClamped = 10.f;						// Pretend we start at target rate.  F32 gFrameDTClamped = 0.f;					// Time between adjacent checks to network for packets @@ -1464,7 +1464,7 @@ bool LLAppViewer::mainLoop()  					ms_sleep(500);  				} -				const F64 max_idle_time = llmin(.005f*10.0f*gFrameTimeSeconds, (0.005f)); // 5 ms a second +				const F64 max_idle_time = llmin(.005*10.0*gFrameTimeSeconds, LLUnitImplicit<F32, LLUnits::Seconds>(0.005f)); // 5 ms a second  				idleTimer.reset();  				S32 total_work_pending = 0;  				S32 total_io_pending = 0;	 diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 76724a9662..60a1045f58 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -336,7 +336,7 @@ extern LLPumpIO* gServicePump;  extern LLUnitImplicit<U64, LLUnits::Microseconds>	gStartTime;  extern LLUnitImplicit<U64, LLUnits::Microseconds>   gFrameTime;					// The timestamp of the most-recently-processed frame -extern F32		gFrameTimeSeconds;			// Loses msec precision after ~4.5 hours... +extern LLUnitImplicit<F32, LLUnits::Seconds>		gFrameTimeSeconds;			// Loses msec precision after ~4.5 hours...  extern LLUnitImplicit<F32, LLUnits::Seconds>		gFrameIntervalSeconds;		// Elapsed time between current and previous gFrameTimeSeconds  extern F32		gFPSClamped;				// Frames per second, smoothed, weighted toward last frame  extern F32		gFrameDTClamped; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index ae8afd0eae..3335ff6631 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1429,9 +1429,8 @@ bool idle_startup()  		LL_DEBUGS("AppInit") << "Initializing camera..." << LL_ENDL;  		gFrameTime    = totalTime(); -		F32 last_time = gFrameTimeSeconds; -		const F64 SEC_TO_MICROSEC = 1000000.f; -		gFrameTimeSeconds = (F32)((gFrameTime - gStartTime) / SEC_TO_MICROSEC); +		LLUnit<F32, LLUnits::Seconds> last_time = gFrameTimeSeconds; +		gFrameTimeSeconds = (gFrameTime - gStartTime);  		gFrameIntervalSeconds = gFrameTimeSeconds - last_time;  		if (gFrameIntervalSeconds < 0.f) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 214d4f2bf6..e8f68527e9 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -999,10 +999,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)  	// Time _can_ go backwards, for example if the user changes the system clock.  	// It doesn't cause any fatal problems (just some oddness with stats), so we shouldn't assert here.  //	llassert(time > gFrameTime); -	const F64 SEC_TO_MICROSEC = 1000000.f; -	F64 time_diff = U64_to_F64(time - gFrameTime)/SEC_TO_MICROSEC; +	LLUnit<F64, LLUnits::Seconds> time_diff = time - gFrameTime;  	gFrameTime	= time; -	F64 time_since_start = U64_to_F64(gFrameTime - gStartTime)/SEC_TO_MICROSEC; +	LLUnit<F64, LLUnits::Seconds> time_since_start = gFrameTime - gStartTime;  	gFrameTimeSeconds = time_since_start;  	gFrameIntervalSeconds = gFrameTimeSeconds - last_time; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 06a2dad07f..8cb519b098 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -596,7 +596,7 @@ void send_stats()  	S32 window_height = gViewerWindow->getWindowHeightRaw();  	S32 window_size = (window_width * window_height) / 1024;  	misc["string_1"] = llformat("%d", window_size); -	misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds); +	misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds.value());  // 	misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21  // 	misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21 | 
