Revert commit using getters for gameThread times - wrong type size

This commit is contained in:
Stephen Saunders 2021-10-01 00:29:09 -04:00
parent 79b28779b7
commit aeefb34561
2 changed files with 10 additions and 9 deletions

View file

@ -270,13 +270,14 @@ float idConsoleLocal::DrawFPS( float y )
}
// DG end
const uint64 gameThreadTotalTime = commonLocal.GetGameThreadTotalTime();
const uint64 gameThreadGameTime = commonLocal.GetGameThreadGameTime();
const uint64 gameThreadRenderTime = commonLocal.GetGameThreadRenderTime();
// SRS - Shouldn't use these getters since they access and return int-sized variables measured in milliseconds
//const uint64 gameThreadTotalTime = commonLocal.GetGameThreadTotalTime();
//const uint64 gameThreadGameTime = commonLocal.GetGameThreadGameTime();
//const uint64 gameThreadRenderTime = commonLocal.GetGameThreadRenderTime();
//const uint64 gameThreadTotalTime = commonLocal.mainFrameTiming.finishDrawTime - commonLocal.mainFrameTiming.startGameTime;
//const uint64 gameThreadGameTime = commonLocal.mainFrameTiming.finishGameTime - commonLocal.mainFrameTiming.startGameTime;
//const uint64 gameThreadRenderTime = commonLocal.mainFrameTiming.finishDrawTime - commonLocal.mainFrameTiming.finishGameTime;
const uint64 gameThreadTotalTime = commonLocal.mainFrameTiming.finishDrawTime - commonLocal.mainFrameTiming.startGameTime;
const uint64 gameThreadGameTime = commonLocal.mainFrameTiming.finishGameTime - commonLocal.mainFrameTiming.startGameTime;
const uint64 gameThreadRenderTime = commonLocal.mainFrameTiming.finishDrawTime - commonLocal.mainFrameTiming.finishGameTime;
const uint64 rendererBackEndTime = commonLocal.GetRendererBackEndMicroseconds();
const uint64 rendererShadowsTime = commonLocal.GetRendererShadowsMicroseconds();

View file

@ -155,7 +155,7 @@ int idGameThread::Run()
commonLocal.frameTiming.finishGameTime = Sys_Microseconds();
SetThreadGameTime( commonLocal.frameTiming.finishGameTime - commonLocal.frameTiming.startGameTime );
SetThreadGameTime( ( commonLocal.frameTiming.finishGameTime - commonLocal.frameTiming.startGameTime ) / 1000 );
// build render commands and geometry
{
@ -165,9 +165,9 @@ int idGameThread::Run()
commonLocal.frameTiming.finishDrawTime = Sys_Microseconds();
SetThreadRenderTime( commonLocal.frameTiming.finishDrawTime - commonLocal.frameTiming.finishGameTime );
SetThreadRenderTime( ( commonLocal.frameTiming.finishDrawTime - commonLocal.frameTiming.finishGameTime ) / 1000 );
SetThreadTotalTime( commonLocal.frameTiming.finishDrawTime - commonLocal.frameTiming.startGameTime );
SetThreadTotalTime( ( commonLocal.frameTiming.finishDrawTime - commonLocal.frameTiming.startGameTime ) / 1000 );
return 0;
}