Initialize LastClockUpdate, LastVerticalRefresh and LastCyclePrintout with the value of StartTickCount.

svn path=/branches/ntvdm/; revision=61021
This commit is contained in:
Hermès Bélusca-Maïto 2013-11-17 20:44:23 +00:00
parent da7d643e51
commit fb031ba118

View file

@ -70,15 +70,14 @@ INT wmain(INT argc, WCHAR *argv[])
{
INT i;
CHAR CommandLine[DOS_CMDLINE_LENGTH];
DWORD CurrentTickCount;
DWORD Cycles = 0;
DWORD LastCyclePrintout = GetTickCount();
DWORD LastVerticalRefresh = GetTickCount();
DWORD LastClockUpdate = GetTickCount();
LARGE_INTEGER StartPerfCount;
LARGE_INTEGER Frequency, LastTimerTick, LastRtcTick, Counter;
LONGLONG TimerTicks;
LARGE_INTEGER StartPerfCount;
DWORD StartTickCount;
DWORD StartTickCount, CurrentTickCount;
DWORD LastClockUpdate;
DWORD LastVerticalRefresh;
DWORD LastCyclePrintout;
DWORD Cycles = 0;
/* Set the handler routine */
SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE);
@ -152,6 +151,9 @@ INT wmain(INT argc, WCHAR *argv[])
StartTickCount = GetTickCount();
QueryPerformanceCounter(&StartPerfCount);
/* Set the different last counts to the starting count */
LastClockUpdate = LastVerticalRefresh = LastCyclePrintout = StartTickCount;
/* Set the last timer ticks to the current time */
LastTimerTick = LastRtcTick = StartPerfCount;