ProgramChange from http://zhidao.baidu.com/question/57378776.html
Other reference http://www.vckbase.com/document/viewdoc? Id = 1301
The queryperformancefrequency () and queryperformancecounter () functions should be used for scheduled operations with higher precision requirements. These two functions are precise time functions only for Windows 95 and later versions, and require computers to support accurate timers on hardware.
Example:
# Include <iostream> <br/> # include <windows. h> <br/> using namespace STD; </P> <p> void test () // Test Procedure <br/>{< br/> for (INT I = 0; I <1000; I ++) <br/> {<br/> for (Int J = 0; j <100; j ++) <br/> {<br/> printf ("% d, % d/N ", I, j); <br/>}</P> <p> int main (void) <br/>{< br/> large_integer begaintime; <br/> large_integer endtime; <br/> large_integer frequency; <br/> queryperformancefrequency (& frequency ); <br/> queryperformancecounter (& begaintime ); </P> <p> // The <SPAN class = 'wp _ keywordlink'> Code </span> to be tested is put here <br/> test (); </P> <p> queryperformancecounter (& endtime); </P> <p> // output running time (unit: S) <br/> cout <"running time (unit: S):" <(double) (endtime. quadpart-begaintime. quadpart)/frequency. quadpart <Endl; </P> <p> system ("pause"); <br/> return 0; <br/>}