// Call the queryperformancefrequency () function to obtain the clock frequency of the timer. // call queryperformancecounter () before and after events that require strict timing, and use the difference in counting and clock frequency obtained twice, the precise time of the event experience can be calculated. // the high-precision timer for Win9x: queryperformancefrequency () and queryperformancecounter (). The computer must support high-precision timer on hardware. // The data type largeinteger can be an 8-byte long integer or a union structure of two 4-byte long integers, the specific usage depends on whether the compiler supports 64-bit. large_integer frequency = {0}; queryperformancefrequency (& frequency); double F = (double) frequency. quadpart; queryperformancecounter (& frequency); Longlong I = frequency. quadpart; {// do something here} queryperformancecounter (& frequency); string result; result. format (_ T ("Result: % F"), double (frequency. quadpart-I)/F); MessageBox (null, P, _ T ("Test Report"), mb_ OK );