Export (0) Print
Expand All
Expand Minimize

PdhGetCounterTimeBase function

Returns the time base of the specified counter.

Syntax


PDH_STATUS PdhGetCounterTimeBase(
  _In_  PDH_HCOUNTER hCounter,
  _Out_ LONGLONG     *pTimeBase
);

Parameters

hCounter [in]

Handle to the counter. The PdhAddCounter function returns this handle.

pTimeBase [out]

Time base that specifies the number of performance values a counter samples per second.

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a system error code or a PDH error code. The following are possible values.

Return codeDescription
PDH_INVALID_ARGUMENT

The specified counter does not use a time base.

PDH_INVALID_HANDLE

The counter handle is not valid.

 

Remarks

If you use the PdhFormatFromRawValue function to calculate a displayable value instead of calling the PdhCalculateCounterFromRawValue function, you must call the PdhGetCounterTimeBase function to retrieve the time base.

Each counter that returns time-based performance data has a time base defined for it. The time base of a counter is the number of times a counter samples data per second.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Pdh.h

Library

Pdh.lib

DLL

Pdh.dll

See also

PdhFormatFromRawValue

 

 

Community Additions

ADD
Show:
© 2015 Microsoft