Chinaunix首页 | 论坛 | 博客
  • 博客访问: 818701
  • 博文数量: 756
  • 博客积分: 40000
  • 博客等级: 大将
  • 技术积分: 4980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 14:40
文章分类

全部博文(756)

文章存档

2011年(1)

2008年(755)

我的朋友

分类:

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.


--------------------next---------------------

阅读(444) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~