The QueryPerformanceFrequency function retrieves the frequency of the high-resolution performance counter, if one exists. The frequency cannot change while the system is running.
Syntax
BOOL QueryPerformanceFrequency(
LARGE_INTEGER *lpFrequency
);
Parameters
- lpFrequency
-
[out] 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 nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError [ http://msdn.microsoft.com/en-us/library/cc428944.aspx ] . For example, if the installed hardware does not support a high-resolution performance counter, the function fails.
Function Information
| Minimum DLL Version | kernel32.dll |
|---|
| Header | Declared in Winbase.h, include Windows.h |
|---|
| Import library | Kernel32.lib |
|---|
| Minimum operating systems |
Windows 95, Windows NT 3.1 |
|---|
| Unicode | Implemented as
Unicode version. |
|---|
See Also