You can use performance counters.
See "Using the PDH Functions to Consume Counter Data"
The specific counter you should use is Processor Time:
Processor Time is the percentage of time that the processor is executing a non-Idle thread.
This counter was designed as a primary indicator of processor activity.
It is calculated by measuring the time that the processor spends executing the thread of The Idle process-
in each sample interval, and subtracting that value from 100%.
(Each processor has an Idle thread which consumes cycles when no other threads are ready to run).
It can be viewed as the percentage of the sample interval spent doing useful work.
This counter displays the average percentage of busy time observed during the sample interval.
It is calculated by monitoring the time the service was inactive, and then subtracting that value from 100%.
#define _PROCESSOR_COUNTER _T("\\Processor(0)\\% Processor Time")