Is there a way (.net 2.0) for a process to know EXACT amount of processor usage it consumes (something like it would be seen in processexplorer properties/performance graph).
Please, don’t go much further then semi-esoteric questions (p-Invoke OK)
Also, so I don’t open yet another question – how can I (as a process) control my own affinity – i.e. on which processors (cores) should I be allowed to run?
Process affinity is set using Process.ProcessorAffinity.
You can get Process CPU time using Process.TotalProcessorTime but I don’t know if this gives you the desired granularity and snapshotting ability.