UtilProcessGetProcessCpuPercentUsage(Int32) Method

Gets the CPU percentage usage for the process with the specified process id. (PID).

Definition

Namespace: DevCase.Core.Diagnostics.Processes
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static float GetProcessCpuPercentUsage(
	int pid
)

Parameters

pid  Int32
The process id.

Return Value

Single
The resulting CPU percentage usage for the process with the specified process id. (PID).

Remarks

Before calling this method, performance counters must be enabled in the 'app.config' file. See the next example: <configuration> ... <system.net> <settings> <performanceCounters enabled="true"/> </settings> </system.net> ... </configuration>

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also