From 16d9a65d253e71eb545d28f3a38e41279ac4f8cd Mon Sep 17 00:00:00 2001 From: "XTra.KrazzY" Date: Sun, 23 Aug 2009 20:12:46 +0000 Subject: [PATCH] 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 --- Source/Core/Core/Src/HW/VideoInterface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/VideoInterface.cpp b/Source/Core/Core/Src/HW/VideoInterface.cpp index 99d918e91a..53334467ad 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.cpp +++ b/Source/Core/Core/Src/HW/VideoInterface.cpp @@ -1094,9 +1094,10 @@ void Update() // Calculate actual refresh rate static u64 LastTick = 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; // Calculated CPU-GPU synced ticks for the dual core mode too // NOTICE_LOG(VIDEO, "Removed: %s Mhz", ThS(SyncTicksProgress / 1000000, false).c_str());