Compare commits

...

1 Commits

Author SHA1 Message Date
Timo Kreuzer
4fb748315e hack hack 2024-05-02 13:21:13 +03:00
2 changed files with 12 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ static BOOLEAN HalpSetClockRate;
static UCHAR HalpNextClockRate;
/*!
\brief Converts the CMOS RTC rate into the time increment in 100ns intervals.
\brief Converts the CMOS RTC rate into the time increment in 0.1ns intervals.
Rate Frequency Interval (ms) Precise increment (0.1ns)
------------------------------------------------------
@@ -221,15 +221,19 @@ ULONG
NTAPI
HalSetTimeIncrement(IN ULONG Increment)
{
#if 1
return HalpCurrentTimeIncrement;
#else
UCHAR Rate;
ULONG CurrentIncrement;
ULONG NextIncrement;
__debugbreak();
/* Lookup largest value below given Increment */
for (Rate = RtcMinimumClockRate; Rate <= RtcMaximumClockRate; Rate++)
for (Rate = RtcMinimumClockRate; Rate < RtcMaximumClockRate; Rate++)
{
/* Check if this is the largest rate possible */
CurrentIncrement = RtcClockRateToPreciseIncrement(Rate + 1) / 1000;
if (Increment > CurrentIncrement) break;
NextIncrement = RtcClockRateToPreciseIncrement(Rate + 1) / 1000;
if (NextIncrement > Increment)
break;
}
/* Set the rate and tell HAL we want to change it */
@@ -238,4 +242,5 @@ HalSetTimeIncrement(IN ULONG Increment)
/* Return the real increment */
return RtcClockRateToPreciseIncrement(Rate) / 1000;
#endif
}

View File

@@ -54,7 +54,7 @@ START_TEST(NtReadFile)
trace("System is %d bits, Size of MDL: %lu\n", Is64BitSystem() ? 64 : 32, SizeOfMdl());
trace("Max MDL data size: 0x%lx bytes\n", LargeMdlMaxDataSize);
//__debugbreak();
ByteOffset.QuadPart = 0;
Buffer = NULL;