How to measure time

LARGE_INTEGER  before;
LARGE_INTEGER  after;
LARGE_INTEGER  freq;
 
QueryPerformanceCounter(&before);
    Method();//something to measure
    QueryPerformanceCounter(&after);
    QueryPerformanceFrequency(&freq);
    DWORD time = (DWORD)((after.QuadPart - before.QuadPart) * 1000 / freq.QuadPart);
    printf("result:%dmsec\n",time);
en.gif en
ja.gif ja


edit
サポートサイト Wikidot.com