less timeGetTime calls, which showed up in TD's profiles. Minor speed boost when idle skipping

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4040 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY 2009-08-23 20:12:46 +00:00
parent 092989dffc
commit 16d9a65d25

View File

@ -1094,9 +1094,10 @@ void Update()
// Calculate actual refresh rate // Calculate actual refresh rate
static u64 LastTick = 0; static u64 LastTick = 0;
static s64 UpdateCheck = timeGetTime() + 1000, TickProgress = 0; static s64 UpdateCheck = timeGetTime() + 1000, TickProgress = 0;
if (UpdateCheck < (int)timeGetTime()) s64 curTime = timeGetTime();
if (UpdateCheck < (int)curTime)
{ {
UpdateCheck = timeGetTime() + 1000; UpdateCheck = curTime + 1000;
TickProgress = CoreTiming::GetTicks() - LastTick; TickProgress = CoreTiming::GetTicks() - LastTick;
// Calculated CPU-GPU synced ticks for the dual core mode too // Calculated CPU-GPU synced ticks for the dual core mode too
// NOTICE_LOG(VIDEO, "Removed: %s Mhz", ThS(SyncTicksProgress / 1000000, false).c_str()); // NOTICE_LOG(VIDEO, "Removed: %s Mhz", ThS(SyncTicksProgress / 1000000, false).c_str());