while cap.isOpened():
ret, frame = cap.read() # read in the frame, status
if ret == True: # if status is true
frame_num += 1 # count frame
if firstFrame is None:
start = datetime.datetime.now() # start time
time.append(0)
...
else:
current = datetime.datetime.now()-start # time for the current frame
current = current.total_seconds()
time.append(current)