Exemplo n.º 1
0
 public HostCpuUsageMeterFast()
 {
     cpuUsageMeter = new CpuUsageMeter(CpuUsageNativeApi.GetSystemUsedTime);
 }
 /// <summary>
 /// Creates <see cref="ProcessCpuUsageMeter"/> for specified process.
 /// </summary>
 public ProcessCpuUsageMeter(int pid)
 {
     handle        = ProcessUtility.OpenLimitedQueryInformationProcessHandle(pid);
     cpuUsageMeter = new CpuUsageMeter(() => CpuUsageNativeApi.GetProcessTime(handle));
 }