14 out of 32 rated this helpful - Rate this topic

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 WINAPI QueryPerformanceFrequency(
  _Out_  LARGE_INTEGER *lpFrequency
);

Parameters

lpFrequency [out]

Type: LARGE_INTEGER*

A 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

Type:

Type: BOOL

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. For example, if the installed hardware does not support a high-resolution performance counter, the function fails.

Remarks

Windows Phone 8: This API is supported.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Reference
QueryPerformanceCounter
Conceptual
Timers

 

 

Send comments about this topic to Microsoft

Build date: 10/26/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.