c# calculate CPU usage for a specific application
Performance Counters – Process – % Processor Time. Little sample code to give you the idea: using System; using System.Diagnostics; using System.Threading; namespace StackOverflow { class Program { static void Main(string[] args) { PerformanceCounter myAppCpu = new PerformanceCounter( “Process”, “% Processor Time”, “OUTLOOK”, true); Console.WriteLine(“Press the any key to stop…\n”); while (!Console.KeyAvailable) { double pct … Read more