Author: hbelusca
Date: Tue Jan 28 20:18:52 2014
New Revision: 61865
URL:
http://svn.reactos.org/svn/reactos?rev=61865&view=rev
Log:
[NTVDM]: Replace my #if 0 by #ifdef IPS_DISPLAY for DPRINTing (or not) the no. of
instructions per seconds.
Modified:
branches/ntvdm/subsystems/ntvdm/ntvdm.c
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Tue Jan 28 20:18:52 2014
@@ -25,6 +25,8 @@
* ntvdm.exe <program>
*/
#define TESTING
+
+#define IPS_DISPLAY
/* PUBLIC VARIABLES ***********************************************************/
@@ -169,7 +171,7 @@
DWORD StartTickCount, CurrentTickCount;
DWORD LastClockUpdate;
DWORD LastVerticalRefresh;
-#if 0
+#ifdef IPS_DISPLAY
DWORD LastCyclePrintout;
DWORD Cycles = 0;
#endif
@@ -243,7 +245,11 @@
QueryPerformanceCounter(&StartPerfCount);
/* Set the different last counts to the starting count */
- LastClockUpdate = LastVerticalRefresh = /*LastCyclePrintout =*/ StartTickCount;
+ LastClockUpdate = LastVerticalRefresh =
+#ifdef IPS_DISPLAY
+ LastCyclePrintout =
+#endif
+ StartTickCount;
/* Set the last timer ticks to the current time */
LastTimerTick = LastRtcTick = StartPerfCount;
@@ -317,12 +323,12 @@
for (i = 0; (i < STEPS_PER_CYCLE) && VdmRunning; i++)
{
EmulatorStep();
-#if 0
+#ifdef IPS_DISPLAY
Cycles++;
#endif
}
-#if 0
+#ifdef IPS_DISPLAY
if ((CurrentTickCount - LastCyclePrintout) >= 1000)
{
DPRINT1("NTVDM: %lu Instructions Per Second\n", Cycles);