Expose timer performance counter and clock rate functions
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in -59m30s
Builds / ExectOS (amd64, debug) (push) Successful in -59m28s
Builds / ExectOS (i686, release) (push) Successful in -59m30s
Builds / ExectOS (i686, debug) (push) Successful in -59m29s

This commit is contained in:
2026-05-10 23:42:13 +02:00
parent 6b14f31107
commit 897d9d4099
3 changed files with 48 additions and 0 deletions

View File

@@ -9,6 +9,24 @@
#include <xtos.hh>
/**
* Retrieves the current value of the high-resolution performance counter.
*
* @param PerformanceFrequency
* Suplies an optional pointer to a variable that receives the performance counter frequency in Hz.
*
* @return This routine returns the current 64-bit monotonic tick count.
*
* @since XT 1.0
*/
XTCLINK
XTAPI
LARGE_INTEGER
HlQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceFrequency)
{
return HL::Timer::QueryPerformanceCounter(PerformanceFrequency);
}
/**
* Reads the 8-bit data from the specified I/O port.
*
@@ -117,6 +135,24 @@ HlReadRegister32(IN PVOID Register)
return HL::IoRegister::ReadRegister32(Register);
}
/**
* Requests a dynamic adjustment of the system clock resolution.
*
* @param Rate
* The requested clock rate change in 100-nanosecond units.
*
* @return This routine returns the actual clock rate granted by the hardware.
*
* @since XT 1.0
*/
XTCLINK
XTAPI
ULONG
HlSetClockRate(IN ULONG Rate)
{
return HL::Timer::SetClockRate(Rate);
}
/**
* Writes the 8-bit data to the specified I/O port.
*