Здравствуйте, VladD2, Вы писали:
VD>Utils.PerfCounter — простенький классик для точного замера производительности в дотнете.
The QueryPerformanceFrequency function retrieves the frequency of the high-resolution performance counter, if one exists. The frequency cannot change while the system is running.
Что если съэкономить на вызове QueryPerformanceFrequency:
public struct PerfCounter
{
Int64 _start;
public void Start()
{
_start = 0;
QueryPerformanceCounter(ref _start);
}
public float Finish()
{
Int64 finish = 0;
QueryPerformanceCounter(ref finish);