MFC-C++
프로그램 실행시간 측정하기
MuTa
2011. 12. 2. 23:35
http://zfanta.com/345
그냥 GetTickCount() 한 방으로 ms 단위로 뽑는 방법도 있습니다.
- #include <stdio.h>
- #include <time.h>
- main()
- {
- clock_t start, end;
- int count,a;
- double result;
-
- start = clock();
- for(count=0;count<10000;count++)
- printf(" ");
-
- end = clock();
-
- result = (double)(end-start) / CLOCKS_PER_SEC;
-
- printf("%f",result);
- }
그냥 GetTickCount() 한 방으로 ms 단위로 뽑는 방법도 있습니다.