From bfd1c2a6b9370be0f6ee82fbfb07ebd9f83729bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 18 Apr 2015 01:39:29 +0000 Subject: [PATCH] [NTVDM]: Minor code reorganization. StartTickCount is commented out because it's unused at the moment, but it can be useful later on... svn path=/trunk/; revision=67237 --- reactos/subsystems/mvdm/ntvdm/clock.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/reactos/subsystems/mvdm/ntvdm/clock.c b/reactos/subsystems/mvdm/ntvdm/clock.c index f03d6c69057..b0a4190d7e5 100644 --- a/reactos/subsystems/mvdm/ntvdm/clock.c +++ b/reactos/subsystems/mvdm/ntvdm/clock.c @@ -40,9 +40,12 @@ static LIST_ENTRY Timers; static LARGE_INTEGER StartPerfCount, Frequency; -static DWORD StartTickCount; +// static ULONG StartTickCount; +static LARGE_INTEGER Counter; +static ULONG CurrentTickCount; #ifdef IPS_DISPLAY +static PHARDWARE_TIMER IpsTimer; static ULONGLONG Cycles = 0ULL; #endif @@ -63,15 +66,12 @@ VOID ClockUpdate(VOID) extern BOOLEAN CpuRunning; UINT i; PLIST_ENTRY Entry; - LARGE_INTEGER Counter; while (VdmRunning && CpuRunning) { - /* Get the current number of ticks */ - DWORD CurrentTickCount = GetTickCount(); - - /* Get the current performance counter value */ + /* Get the current counters */ /// DWORD_PTR oldmask = SetThreadAffinityMask(GetCurrentThread(), 0); + CurrentTickCount = GetTickCount(); NtQueryPerformanceCounter(&Counter, NULL); /// SetThreadAffinityMask(GetCurrentThread(), oldmask); @@ -197,10 +197,6 @@ VOID DestroyHardwareTimer(PHARDWARE_TIMER Timer) BOOLEAN ClockInitialize(VOID) { -#ifdef IPS_DISPLAY - PHARDWARE_TIMER IpsTimer; -#endif - InitializeListHead(&Timers); /* Initialize the performance counter (needed for hardware timers) */ @@ -213,7 +209,7 @@ BOOLEAN ClockInitialize(VOID) } /* Find the starting tick count */ - StartTickCount = GetTickCount(); + // StartTickCount = GetTickCount(); #ifdef IPS_DISPLAY