Original Post
I have two threads in my game, one for network and one for physics. I want to profile them both so that I know what percentage of the CPU is being used by each. I want to count CPU time (or CPU cycles, if you like), but ignore wall time (like when a thread is sleeping). So for example:
StartCounting();
sleep(2500);
double time = StopCounting();
time would equal something close to 0 instead of close to 2500. Can the Win XP performance counters be used for this? How would I do that? This is C++ (I suppose it might be easier in .Net?) Many thanks!