3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/hal/x86/perfcnt.c
6 * PURPOSE: Performance counter functions
7 * PROGRAMMER: David Welch (welch@mcmail.com)
8 * Eric Kohl (ekohl@rz-online.de)
14 /* INCLUDES ***************************************************************/
16 #include <ddk/ntddk.h>
18 /* FUNCTIONS **************************************************************/
22 HalCalibratePerformanceCounter(ULONG Count)
26 /* save flags and disable interrupts */
30 for (i = 0; i < Count; i++);
38 KeQueryPerformanceCounter(PLARGE_INTEGER PerformanceFreq)
40 * FUNCTION: Queries the finest grained running count avaiable in the system
42 * PerformanceFreq (OUT) = The routine stores the number of
43 * performance counters tick per second here
44 * RETURNS: The performance counter value in HERTZ
45 * NOTE: Returns the system tick count or the time-stamp on the pentium
48 if (PerformanceFreq != NULL)
50 PerformanceFreq->QuadPart = 0;
51 return *PerformanceFreq;