프로그램 실행 시작부터 끝날때까지 몇초나 걸렸는지 타임을 알고 싶어요.
어떤 함수를 사용해야 될거 같은데 뭘 쓰면 돼요?
그리고 몇번째줄에 추가해야 되는지도 알려주세요~~
https://stackoverflow.com/questions/5248915/execution-time-of-c-program
clock_t begin = clock(); /* here, do your time-consuming job */ clock_t end = clock(); double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
#include <time.h> 맨위에넣고 저 코드 쓰면됨
스레드 돌려서 시간 재면 되지 않음?
감사합니다 해볼게요~
초보라서 쓰레드 돌리라하면 어떻게 해야 하는지 몰라요 ㅎㅎ
chrno 비슷한 이름의 헤더
https://stackoverflow.com/questions/5248915/execution-time-of-c-program
clock_t begin = clock(); /* here, do your time-consuming job */ clock_t end = clock(); double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
#include <time.h> 맨위에넣고 저 코드 쓰면됨
스레드 돌려서 시간 재면 되지 않음?
감사합니다 해볼게요~
초보라서 쓰레드 돌리라하면 어떻게 해야 하는지 몰라요 ㅎㅎ
chrno 비슷한 이름의 헤더