Skip to content

Feat: Set timer resolution (1ms)#120

Merged
RedHawk989 merged 3 commits intoEyeTrackVR:v2.0-beta-feature-branchfrom
SnuffSocket:timer-branch
Nov 27, 2024
Merged

Feat: Set timer resolution (1ms)#120
RedHawk989 merged 3 commits intoEyeTrackVR:v2.0-beta-feature-branchfrom
SnuffSocket:timer-branch

Conversation

@SnuffSocket
Copy link
Contributor

@SnuffSocket SnuffSocket commented Oct 7, 2024

Description

Reasoning frequent use of "time.time()" which could cause unexpected behaviour. For example "camera.py" used to contain:
 Line self.fps = 1 / (self.newft - self.prevft) which triggered "ZeroDivisionError" if loop ran faster than windows default timer resolution.
 Your current code correctly handles this example, so this isn't an issue anymore but...

TLDR:
 Rather than hope that user has a program open that requests a higher timer resolution. Do it ourselves?

Checklist

  • I accept the CLA.

@RedHawk989
Copy link
Collaborator

Just a quick note: I'm on hiatus for this month for personal things. I will review your PRs sometime in November. Thanks!

@RedHawk989 RedHawk989 merged commit 52e7ee0 into EyeTrackVR:v2.0-beta-feature-branch Nov 27, 2024
@SnuffSocket SnuffSocket deleted the timer-branch branch January 8, 2025 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants