分类:
2008-10-13 16:12:29
When the SystemInformationClass parameter is SystemProcessorPerformanceInformation, the buffer pointed to by the SystemInformation parameter should be large enough to hold an array containing as many SYSTEM_PROCESS_INFORMATION structures
//注,上面的结构是进程信息
as there are processors (CPUs) installed in the system. Each structure has the following layout:
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { LARGE_INTEGER IdleTime; LARGE_INTEGER KernelTime; LARGE_INTEGER UserTime; LARGE_INTEGER Reserved1[2]; ULONG Reserved2; } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
The IdleTime element contains the amount of time that the system has been idle, in 1/100ths of a nanosecond.
The KernelTime element contains the amount of time that the system has spent executing in Kernel mode (including all threads in all processes, on all processors), in 1/100ths of a nanosecond.
The UserTime element contains the amount of time that the system has spent executing in User mode (including all threads in all processes, on all processors), in 1/100ths of a nanosecond.
Use instead to retrieve this information.