private Boolean QueryPerformanceCounterEx(out Int64 fakeTime) { Boolean result; Int64 realTime = 0; Int32 tickCount = SpeedHook.timeGetTime(); result = SpeedHook.QueryPerformanceCounter(out realTime); // Initialize if (StoredPerformanceCounterRealTime == 0) { this.StoredPerformanceCounterRealTime = realTime; this.StoredPerformanceCounterFakeTime = tickCount; } fakeTime = this.StoredPerformanceCounterFakeTime + (Int64)((realTime - this.StoredPerformanceCounterRealTime) * SpeedUp); this.StoredPerformanceCounterRealTime = realTime; this.StoredPerformanceCounterFakeTime = fakeTime; return(result); }