Hi Dan !
Are you planning to run Game Servers ?
I'd strong recommend you to test the following on
TESTING SYSTEMS ONLY, as changing the timer resolution on Windows can seriously harm your system...
You may increase any program's priority without loading the processor if you go through a proper channel. Increasing the tickrate does improve the performance, which may be a requirement mostly for gamservers, but the change also requires more CPU, memory, and bandwidth capacity, for both, the server & the clients..
You can set resolution of the system/kernel timer in the
boot.ini using the "
/TIMERES=number" switch. The argument is a number interpreted in 100's of nanoseconds, but the rate will be set to the closest resolution the HAL supports that is not larger than the one requested.
The following registry value also contains the the boot.ini's startup settings: [
HKLM\System\CurrentControlSet\Control\SystemStartO ptions]
NtSetTimerResolution and NtQueryTimerResolution, the NT kernel functions that manipulate and return information about the system clock. Function NtSetTimerResolution sets resolution of system Timer in calling process context..
You can further setup the kernel timer using the following functions:
NtSetTimer
NtCancelTimer
NtCreateTimer
NtOpenTimer
NtQueryTimer
timeGetTime
timeBeginPeriod
ExSetTimerResolution
Unfortunately, NtSetTimerResolution and NtQueryTimerResolution are not exported by the NT kernel, so they are not available to kernel-mode device drivers.
What you'd need to do is to write down a custom
C/CPP program to get the system time changed as per your requirement:
Quote:
typedef struct _KSYSTEM_TIME
{
ULONG LowPart;
LONG High1Time;
LONG High2Time;
} KSYSTEM_TIME, *PKSYSTEM_TIME;
|
Complete script :
Quote:
typedef struct _KUSER_SHARED_DATA
{
ULONG TickCountLowDeprecated;
ULONG TickCountMultiplier;
KSYSTEM_TIME InterruptTime;
KSYSTEM_TIME SystemTime;
KSYSTEM_TIME TimeZoneBias;
WORD ImageNumberLow;
WORD ImageNumberHigh;
WCHAR NtSystemRoot[260];
ULONG MaxStackTraceDepth;
ULONG CryptoExponent;
ULONG TimeZoneId;
ULONG LargePageMinimum;
ULONG Reserved2[7];
NT_PRODUCT_TYPE NtProductType;
UCHAR ProductTypeIsValid;
ULONG NtMajorVersion;
ULONG NtMinorVersion;
UCHAR ProcessorFeatures[64];
ULONG Reserved1;
ULONG Reserved3;
ULONG TimeSlip;
ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture;
LARGE_INTEGER SystemExpirationDate;
ULONG SuiteMask;
UCHAR KdDebuggerEnabled;
UCHAR NXSupportPolicy;
ULONG ActiveConsoleId;
ULONG DismountCount;
ULONG ComPlusPackage;
ULONG LastSystemRITEventTickCount;
ULONG NumberOfPhysicalPages;
UCHAR SafeBootMode;
ULONG SharedDataFlags;
ULONG DbgErrorPortPresent: 1;
ULONG DbgElevationEnabled: 1;
ULONG DbgVirtEnabled: 1;
ULONG DbgInstallerDetectEnabled: 1;
ULONG SystemDllRelocated: 1;
ULONG SpareBits: 27;
UINT64 TestRetInstruction;
ULONG SystemCall;
ULONG SystemCallReturn;
UINT64 SystemCallPad[3];
union
{
KSYSTEM_TIME TickCount;
UINT64 TickCountQuad;
};
ULONG Cookie;
INT64 ConsoleSessionForegroundProcessId;
ULONG Wow64SharedInformation[16];
WORD UserModeGlobalLogger[8];
ULONG HeapTracingPid[2];
ULONG CritSecTracingPid[2];
ULONG ImageFileExecutionOptions;
union
{
UINT64 AffinityPad;
ULONG ActiveProcessorAffinity;
};
UINT64 InterruptTimeBias;
} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
|
There are various softwares available all over the internet for such purposes, one of them is PCAccelerate.exe.
You'd find more info on the kernel timer resolution here :
Timing in Win32
Boot INI Options Reference
Boot.ini switches used by the Boot Manager | Troubleshoot | Smallvoid.com
Performance counter value may unexpectedly leap forward
Boot.ini RAM Fun - Winforums
Hope that helps
