代码清单1-5
PROCESSOR_POWER_INFORMATION info;

CallNTPowerInformation(11, 	// query processor power information
     NULL,                    	// no input buffer
     0,                         	// input buffer size is zero
     &info,                    	// output buffer
     Sizeof(info));          	// outbuf size 

     __int64 t_begin = GetCPUTickCount();

     // do something

     __int64 t_end = GetCPUTickCount();
     double millisec = ((double)t_end –(double)t_begin)
        /(double)info.CurrentMhz;