Read cpu load on Windows with .NET

Read cpu load on Windows with .NET

In C# (.NET 6 and above), there is now a very simple way to read out the CPU load with minimal overhead - i.e. without threads. The PerformanceCounte