Win32 supports two performance monitoring functions that enable application developers to obtain high-resolution elapsed times. These times can be used to fine-tune sections of source code.
The QueryPerformanceCounter function provides the current value of the high-resolution performance counter, if one exists on the system.
The QueryPerformanceFrequency function provides the frequency of the high-resolution performance counter, if one exits on the system. The frequency is expressed in counts per second. The value of count is processor-dependent. For example, on some processors, count might be the cycle rate of the processor clock.