E D R , A S I H C RSS

BackLinks search for "QueryPerformanceCounter"

BackLinks of QueryPerformanceCounter


Search BackLinks only
Display context of search results
Case-sensitive searching
  • PerformanceTest
          BOOL QueryPerformanceCounter(LARGE_INTEGER* param)
          QueryPerformanceCounter((LARGE_INTEGER*)&m_nStart);
          QueryPerformanceCounter((LARGE_INTEGER*)&m_nEnd);
         펜티엄 이상의 CPU에서 RDTSC(Read from Time Stamp Counter)를 이용하는 방법이 있다. 펜티엄은 내부적으로 TSC(Time Stamp Counter)라는 64비트 카운터를 가지고 있는데 이 카운터의 값은 클럭 사이클마다 증가한다. RDTSC는 내부 TSC카운터의 값을 EDX와 EAX 레지스터에 복사하는 명령이다. 이 명령은 6에서 11클럭을 소요한다. Win32 API의 QueryPerformanceCounter도 이 명령을 이용해 구현한 것으로 추측된다. 인라인 어셈블러를 사용하여 다음과 같이 사용할 수 있다.
  • HighResolutionTimer
         The '''QueryPerformanceCounter''' function retrieves the current value of the high-resolution performance counter (if one exists on the system). By calling this function at the beginning and end of a section of code, an application essentially uses the counter as a high-resolution timer. For example, suppose that '''QueryPerformanceFrequency''' indicates that the frequency of the high-resolution performance counter is 50,000 counts per second. If the application calls '''QueryPerformanceCounter''' immediately before and immediately after the section of code to be timed, the counter values might be 1500 counts and 3500 counts, respectively. These values would indicate that .04 seconds (2000 counts) elapsed while the code executed.
Found 2 matching pages out of 7540 total pages

You can also click here to search title.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
Processing time 0.0059 sec