private ulong Detour_GetTickCount64() { SpeedHack This = (SpeedHack)HookRuntimeInfo.Callback; var tickCount = Interop.Kernel32.GetTickCount64(); return((ulong)(This._baseTime64 + ((tickCount - This._baseTime64)) * This._acceleration)); }
private Interop.BOOL Detour_QueryPerformanceCounter(out long performanceCount) { SpeedHack This = (SpeedHack)HookRuntimeInfo.Callback; var result = Interop.Kernel32.QueryPerformanceCounter(out long realPerformanceCount); performanceCount = (long)(This._basePerformanceCount + ((realPerformanceCount - This._basePerformanceCount)) * This._acceleration); return(result); }
private uint Detour_SleepEx(uint milliSeconds, Interop.BOOL alertable) { SpeedHack This = (SpeedHack)HookRuntimeInfo.Callback; return(Interop.Kernel32.SleepEx((uint)(milliSeconds / This._acceleration), alertable)); }