I'm having a bit of trouble finding a reliable method of determining CPU frequency in Windows (7).
I've tried using Perfmon, but it has a maximum sampling frequency of 1 Hz. Also, I don't have kernel-level access, so I can't use machine specific registers. There are a number of C functions which can determine the maximum frequency of the processor, but SpeedStep and Turbo Boost make these methods unreliable, as the ones I have tried use an on-chip timer which runs at a constant rate, and thus doesn't reflect the variable processor frequency.
I know that programs such as CPU-Z are able to directly measure the CPU frequency, but I'm at a loss as to how they are actually doing so. Any help is greatly appreciated!
Edit: I've also been looking into the possibility of using ACPI to monitor the CPU P-States... is this an option?
Edit2: I'm currently looking into using the machine-specific registers (http://www.intel.com/content/dam/doc/manual/64-ia-32-architectures-software-developer-vol-3b-part-2-manual.pdf) to get this information... I feel like this might be overkill for the solution, but it's the best lead I've got at the moment.