fix : Change time.clock to time.perf_counter
@@ -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)
