Skip to content

Commit

Permalink
adding more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
timmarkhuff committed Sep 3, 2024
1 parent c7dffa3 commit d3f8fff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/framegrab/grabber.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,10 @@ def _grab_implementation(self) -> np.ndarray:
# Assuming buffer size of 1, we need to read twice to get the current frame.
t1 = time.time()
for _ in range(2):
t1_inner = time.time()
_, frame = self.capture.read()
t2_inner = time.time()
logger.info(f'Debug | reading once: {t2_inner - t1_inner}')
t2 = time.time()
logger.info(f'Debug | reading twice: {t2 - t1}')

Expand Down

0 comments on commit d3f8fff

Please sign in to comment.