Tao.Platform.Windows SDK Documentation

Kernel.QueryPerformanceFrequency Method 

The QueryPerformanceFrequency function retrieves the frequency of the high-resolution performance counter, if one exists. The frequency cannot change while the system is running.

[Visual Basic]
Public Shared Function QueryPerformanceFrequency( _
   ByRef frequency As Long _
) As Boolean
[C#]
public static bool QueryPerformanceFrequency(
   out long frequency
);

Parameters

frequency
Pointer to a variable that receives the current performance-counter frequency, in counts per second. If the installed hardware does not support a high-resolution performance counter, this parameter can be zero.

Return Value

If the installed hardware supports a high-resolution performance counter, the return value is true.

If the function fails, the return value is false. To get extended error information, call GetLastWin32Error. For example, if the installed hardware does not support a high-resolution performance counter, the function fails.

Remarks

Note The frequency of the high-resolution performance counter is not the processor speed.

See Also

Kernel Class | Tao.Platform.Windows Namespace | QueryPerformanceCounter