PerformanceCounter creation take a LONG time
问题 I'm working on a charge balancing system and thus I need to know the charge of each machine. PerformanceCounter seem the way to go, but creating the first one take between 38 and 60 sec. Each subsequent new Counter or 'NextValue' call is nearly instant however. Here is the code I'm using : [TestClass] public class PerfMon { [TestMethod] public void SimpleCreationTest() { Stopwatch Time = new Stopwatch(); Time.Start(); Debug.WriteLine("Time is : " + Time.ElapsedMilliseconds); // Create