The code below will start to print the time if:
time.time() - start_time) >10
and Total_ratio > 5.0
but its only works once. How to make it work for every 10 seconds because its works only once.
end_time = time.time() + 5
if ((time.time() - start_time) >10 and Total_ratio > 5.0 ):
cv2.putText(frame, "Closed", (50, 150), font, 7, (0, 255, 255), thickness=3)
print(ctime())
if time.time() > end_time:
break
Change as required: