Platform SDK: Performance Monitoring

Getting the Time Base of a Counter

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. To determine this time base for a specific counter, call the PdhGetCounterTimeBase function. If a non-time-based counter is used, PDH_INVALID_ARGUMENT will be returned.

The PdhFormatFromRawValue function requires the time base returned by PdhGetCounterTimeBase for its performance data value calculations.