본문 바로가기

Code Habit

검색하기
Code Habit
프로필사진 코드베어

  • 분류 전체보기 (203)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
  • package
  • go언어
  • Linux
  • window
  • install
  • 리뷰
  • Sync
  • Close
  • GO 언어
  • windows
  • Python
  • c++
  • Golang
  • json
  • Callback
  • 영화
  • FOR
  • C
  • 책
  • go
  • channel
  • http
  • File
  • range
  • write
  • mutex
  • API
  • JavaScript
  • bitcoin
  • tcp
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록수행시간 (1)

Code Habit

[c/c++] 프로세스 수행 시간 측정

개발을 하다보면 부하가 걸리는 부분의 로직별 수행시간을 측정할 필요가 있다. 다음 소스를 사용하면 ms(마이크로세컨드) 단위로 수행속도를 측정할 수 있다. #include #include int main(void) { clock_t start, end; start = clock(); // 수행할 로직 end = clock(); printf("%f\n", ((double)(end-start)) / CLOCKS_PER_SEC); } CLOCKS_PER_SEC은 ms(마이크로세컨드)를 s(초)단위로 변경할 때 쓰이는 매크로 상수이다.

카테고리 없음 2021. 7. 2. 17:49
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바