我想知道是否存在用于精确时间测量的“.net集成”解决方案(如功能的执行时间)?目前我正在使用Kernel32中的PerformanceCounters。
[DllImport("Kernel32.dll")]
private static extern bool QueryPerformanceCounter(
out long lpPerformanceCount);
[DllImport("Kernel32.dll")]
private static extern bool QueryPerformanceFrequency(
out long lpFrequency);