--- src/emu-i386/cputime.c Mon Dec 16 00:45:12 2002 +++ src/emu-i386/cputime.c Tue Dec 17 04:54:30 2002 @@ -181,7 +181,6 @@ * but only flags processing (& other features) */ RAWcpuTIME = rawP5time; /* in usecs */ GETcpuTIME = getP5time; /* in usecs */ - ZeroTimeBase.td = GETTSC(); /* in CPU cycles */ g_printf("TIMER: using pentium timing\n"); } else { @@ -189,7 +188,6 @@ * 'rdtsc off' into config file */ RAWcpuTIME = rawC4time; /* in usecs */ GETcpuTIME = getC4time; /* in usecs */ - ZeroTimeBase.td = rawC4time(); /* in usecs */ if (config.realcpu) { if (kernel_version_code < 0x2017e) g_printf("TIMER: using gettimeofday\n"); @@ -197,6 +195,7 @@ g_printf("TIMER: using new gettimeofday with microsecond resolution\n"); } } + ZeroTimeBase.td = RAWcpuTIME(); } @@ -208,7 +207,7 @@ if (cpu_time_stop) return 1; if (!quiet) dbug_printf("STOP TIME\n"); StopTimeBase = RAWcpuTIME(); - LastTimeRead = StopTimeBase - TSCtoUS(ZeroTimeBase.td); + LastTimeRead = StopTimeBase - ZeroTimeBase.td; cpu_time_stop = 1; return 0; } @@ -218,7 +217,7 @@ { if (!cpu_time_stop) return 1; if (!quiet) dbug_printf("RESTART TIME\n"); - ZeroTimeBase.td += ((RAWcpuTIME() - StopTimeBase) * config.CPUSpeedInMhz); + ZeroTimeBase.td += RAWcpuTIME() - StopTimeBase; cpu_time_stop = 0; return 0; }