오늘의 인기 글
최근 글
최근 댓글
Today
Total
05-19 08:40
관리 메뉴

우노

[Python] 시간 측정 본문

Language/Python

[Python] 시간 측정

운호(Noah) 2021. 8. 19. 13:21

초 단위 측정

import time

# 초 단위
start_s = int(round(time.time()))
end_s = int(round(time.time()))
print("second : ", end_s - start_s)

밀리 초 단위 측정

import time

# 밀리 초 단위
start_ms = int(round(time.time() * 1000))
end_ms = int(round(time.time() * 1000))
print("milli second : ", end_ms - start_ms)
Comments