Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
fix : Change time.clock to time.perf_counter (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
lm-kasuga authored Sep 4, 2020
1 parent 29cdb48 commit 034ccfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions output_template/python/usb_camera_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ def capture_loop(q_input):
vc = init_camera(camera_width, camera_height)

count_frames = 10
prev_1 = time.clock()
prev_1 = time.perf_counter()
prev = deque([prev_1] * count_frames)

while True:
valid, img = vc.read()
if valid:
now = time.clock()
now = time.perf_counter()
prev.append(now)
old = prev.popleft()
fps = count_frames / (now - old)
Expand Down

0 comments on commit 034ccfb

Please sign in to comment.