mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 01:25:56 +00:00
[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
This commit is contained in:
parent
7087659a28
commit
bfd1c2a6b9
1 changed files with 7 additions and 11 deletions
|
@ -40,9 +40,12 @@
|
||||||
|
|
||||||
static LIST_ENTRY Timers;
|
static LIST_ENTRY Timers;
|
||||||
static LARGE_INTEGER StartPerfCount, Frequency;
|
static LARGE_INTEGER StartPerfCount, Frequency;
|
||||||
static DWORD StartTickCount;
|
// static ULONG StartTickCount;
|
||||||
|
static LARGE_INTEGER Counter;
|
||||||
|
static ULONG CurrentTickCount;
|
||||||
|
|
||||||
#ifdef IPS_DISPLAY
|
#ifdef IPS_DISPLAY
|
||||||
|
static PHARDWARE_TIMER IpsTimer;
|
||||||
static ULONGLONG Cycles = 0ULL;
|
static ULONGLONG Cycles = 0ULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -63,15 +66,12 @@ VOID ClockUpdate(VOID)
|
||||||
extern BOOLEAN CpuRunning;
|
extern BOOLEAN CpuRunning;
|
||||||
UINT i;
|
UINT i;
|
||||||
PLIST_ENTRY Entry;
|
PLIST_ENTRY Entry;
|
||||||
LARGE_INTEGER Counter;
|
|
||||||
|
|
||||||
while (VdmRunning && CpuRunning)
|
while (VdmRunning && CpuRunning)
|
||||||
{
|
{
|
||||||
/* Get the current number of ticks */
|
/* Get the current counters */
|
||||||
DWORD CurrentTickCount = GetTickCount();
|
|
||||||
|
|
||||||
/* Get the current performance counter value */
|
|
||||||
/// DWORD_PTR oldmask = SetThreadAffinityMask(GetCurrentThread(), 0);
|
/// DWORD_PTR oldmask = SetThreadAffinityMask(GetCurrentThread(), 0);
|
||||||
|
CurrentTickCount = GetTickCount();
|
||||||
NtQueryPerformanceCounter(&Counter, NULL);
|
NtQueryPerformanceCounter(&Counter, NULL);
|
||||||
/// SetThreadAffinityMask(GetCurrentThread(), oldmask);
|
/// SetThreadAffinityMask(GetCurrentThread(), oldmask);
|
||||||
|
|
||||||
|
@ -197,10 +197,6 @@ VOID DestroyHardwareTimer(PHARDWARE_TIMER Timer)
|
||||||
|
|
||||||
BOOLEAN ClockInitialize(VOID)
|
BOOLEAN ClockInitialize(VOID)
|
||||||
{
|
{
|
||||||
#ifdef IPS_DISPLAY
|
|
||||||
PHARDWARE_TIMER IpsTimer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
InitializeListHead(&Timers);
|
InitializeListHead(&Timers);
|
||||||
|
|
||||||
/* Initialize the performance counter (needed for hardware timers) */
|
/* Initialize the performance counter (needed for hardware timers) */
|
||||||
|
@ -213,7 +209,7 @@ BOOLEAN ClockInitialize(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the starting tick count */
|
/* Find the starting tick count */
|
||||||
StartTickCount = GetTickCount();
|
// StartTickCount = GetTickCount();
|
||||||
|
|
||||||
#ifdef IPS_DISPLAY
|
#ifdef IPS_DISPLAY
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue