본문 바로가기

윈도우 프로그램/C++

시간측정

float gap;

time_t start, end;

start = clock();

Sleep(2); //측정 하고자 하는 프로세스

end = clock();

gap = (float)(end - start);

printf("TIME : %fS", gap);