Kill the last timeGetTime calls.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4921 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2010-01-21 21:27:52 +00:00
parent a08bfc1344
commit a43428253b
7 changed files with 21 additions and 20 deletions

View File

@ -132,7 +132,7 @@ cl_command_queue GetCommandQueue()
cl_program CompileProgram(const char *Kernel)
{
u32 compileStart = timeGetTime();
u32 compileStart = Common::Timer::GetTimeMs();
int err;
cl_program program;
program = clCreateProgramWithSource(OpenCL::g_context, 1, (const char **) & Kernel, NULL, &err);
@ -152,13 +152,13 @@ cl_program CompileProgram(const char *Kernel)
return NULL;
}
NOTICE_LOG(COMMON, "OpenCL CompileProgram took %.3f seconds", (float)(timeGetTime() - compileStart) / 1000.0);
NOTICE_LOG(COMMON, "OpenCL CompileProgram took %.3f seconds", (float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
return program;
}
cl_kernel CompileKernel(cl_program program, const char *Function)
{
u32 compileStart = timeGetTime();
u32 compileStart = Common::Timer::GetTimeMs();
int err;
// Create the compute kernel in the program we wish to run
@ -168,7 +168,7 @@ cl_kernel CompileKernel(cl_program program, const char *Function)
HandleCLError(err, "Failed to create compute kernel!");
return NULL;
}
NOTICE_LOG(COMMON, "OpenCL CompileKernel took %.3f seconds", (float)(timeGetTime() - compileStart) / 1000.0);
NOTICE_LOG(COMMON, "OpenCL CompileKernel took %.3f seconds", (float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
return kernel;
}
#endif

View File

@ -128,7 +128,7 @@ std::string Timer::GetTimeElapsedFormatted() const
// The number of milliseconds since the start, use a different value if the timer is stopped
u64 Milliseconds;
if (m_Running)
Milliseconds = timeGetTime() - m_StartTime;
Milliseconds = GetTimeMs() - m_StartTime;
else
Milliseconds = m_LastTime - m_StartTime;
// Seconds

View File

@ -42,7 +42,7 @@ static std::list<MESSAGE> s_listMsgs;
void AddMessage(const char* pstr, u32 ms)
{
s_listMsgs.push_back(MESSAGE(pstr, timeGetTime() + ms));
s_listMsgs.push_back(MESSAGE(pstr, Common::Timer::GetTimeMs() + ms));
}
void DrawMessages()
@ -53,7 +53,7 @@ void DrawMessages()
std::list<MESSAGE>::iterator it = s_listMsgs.begin();
while (it != s_listMsgs.end())
{
int time_left = (int)(it->dwTimeStamp - timeGetTime());
int time_left = (int)(it->dwTimeStamp - Common::Timer::GetTimeMs());
int alpha = 255;
if (time_left < 1024)

View File

@ -137,7 +137,7 @@ void DVProfRegister(const char *pname)
// while(it != g_listAllProfilers.end() ) {
//
// if( _tcscmp(pname, (*it)->pname) == 0 ) {
// (*it)->listTimes.push_back(timeGetTime());
// (*it)->listTimes.push_back(Common::Timer::GetTimeMs());
// DVPROFTRACK dvtrack;
// dvtrack.pdwTime = &(*it)->listTimes.back();
// dvtrack.pprof = *it;

View File

@ -20,6 +20,7 @@
#include <strsafe.h>
#include "Common.h"
#include "Timer.h"
#include "Statistics.h"
#include "VideoConfig.h"
@ -1017,9 +1018,9 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
static int fpscount = 0;
static unsigned long lasttime;
++fpscount;
if (timeGetTime() - lasttime > 1000)
if (Common::Timer::GetTimeMs() - lasttime > 1000)
{
lasttime = timeGetTime();
lasttime = Common::Timer::GetTimeMs();
s_fps = fpscount - 1;
fpscount = 0;
}

View File

@ -203,23 +203,23 @@ void EncodeToRamUsingShader(LPDIRECT3DPIXELSHADER9 shader, LPDIRECT3DTEXTURE9 sr
LPDIRECT3DSURFACE9 s_texConvReadSurface = NULL;
LPDIRECT3DSURFACE9 Rendersurf = NULL;
if(index >= WorkingBuffers)
if (index >= WorkingBuffers)
{
if(WorkingBuffers < NUM_TRANSFORM_BUFFERS)
if (WorkingBuffers < NUM_TRANSFORM_BUFFERS)
WorkingBuffers++;
if(index >= WorkingBuffers)
if (index >= WorkingBuffers)
index--;
if(TrnBuffers[index].RenderSurface != NULL)
if (TrnBuffers[index].RenderSurface != NULL)
{
TrnBuffers[index].RenderSurface->Release();
TrnBuffers[index].RenderSurface = NULL;
}
if(TrnBuffers[index].ReadSurface != NULL)
if (TrnBuffers[index].ReadSurface != NULL)
{
TrnBuffers[index].ReadSurface->Release();
TrnBuffers[index].ReadSurface = NULL;
}
if(TrnBuffers[index].FBTexture != NULL)
if (TrnBuffers[index].FBTexture != NULL)
{
TrnBuffers[index].FBTexture->Release();
TrnBuffers[index].FBTexture = NULL;

View File

@ -1011,9 +1011,9 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
static int fpscount = 0;
static unsigned long lasttime;
++fpscount;
if (timeGetTime() - lasttime > 1000)
if (Common::Timer::GetTimeMs() - lasttime > 1000)
{
lasttime = timeGetTime();
lasttime = Common::Timer::GetTimeMs();
s_fps = fpscount - 1;
fpscount = 0;
}
@ -1163,10 +1163,10 @@ void Renderer::DrawDebugText()
{
if (OSDChoice > 0)
{
OSDTime = timeGetTime() + 3000;
OSDTime = Common::Timer::GetTimeMs() + 3000;
OSDChoice = -OSDChoice;
}
if ((u32)OSDTime > timeGetTime())
if ((u32)OSDTime > Common::Timer::GetTimeMs())
{
std::string T1 = "", T2 = "";
std::vector<std::string> T0;