Platform SDK: Performance Monitoring |
If your data source is a log file, you have the option of defining a time range for a query, which will determine the period of time during which performance data will be collected from the log file. You use the PdhSetQueryTimeRange function to do this. PdhSetQueryTimeRange is not used for queries that collect performance data from real-time data sources.
PdhSetQueryTimeRange sets the start and stop times for the query to the 64-bit (LONGLONG) beginning and ending time values in the PDH_TIME_INFO structure passed in as the second parameter. The standard method for creating these LONGLONG time range values is the following.
If you want to obtain the time range of all of the performance data contained in a log file, use the PdhGetDataSourceTimeRange function. PdhGetDataSourceTimeRange returns this information in a PDH_TIME_INFO structure.