Dear 이현우,
Thank you for reaching out with your questions regarding CPU usage measurement discrepancies between GetProcessTimes and Task Manager. We appreciate your attention to detail and your interest in understanding how Windows reports system performance metrics.
Interrupts and DPCs in Task Manager Yes, Task Manager includes CPU time spent on hardware interrupts and Deferred Procedure Calls (DPCs) under the “System Interrupts” process. This represents time the CPU spends servicing hardware and driver-level events, which is not attributed to any specific user-mode process.
GetProcessTimes Scope The GetProcessTimes API reports CPU time consumed by a specific process in user mode and kernel mode, but it does not include time spent on interrupts or DPCs, as these are handled outside the context of the process itself.
Reason for Discrepancy The difference you’re observing is likely due to interrupt/DPC activity, as well as other system-level tasks that Task Manager accounts for globally but are not reflected in per-process APIs like GetProcessTimes.
- Official References Microsoft provides documentation on Task Manager and performance counters at the following resources: Task Manager Overview System Interrupts Explained GetProcessTimes API Reference
If you’re performing detailed performance analysis, we recommend using Performance Monitor (PerfMon) or Windows Performance Recorder (WPR) for deeper insights into system-level CPU usage, including interrupts and DPCs.
If this guidance proves helpful, feel free to click “Accept Answer” so we know we’re heading in the right direction 😊. And of course, I’m here if you need further clarification or support.
T&B,
Domic Vo