Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overflow in quicktime calibration loop #530

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

Technohacker
Copy link
Contributor

Fixes #529

t0_ts /= CALIBRATE_SIZE;
t0_ns /= CALIBRATE_SIZE;
// Do the expensive average calculation outside the measurement loop
int64_t ts_remainder = 0, ns_remainder = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Could you split this into two declarations? I'm always trying to avoid declaration like this - it's often okay for a few non-pointer variables, but it gets ugly when it's a pointer or the variable name is too long or there are too many of them. Just as a habit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Pushed it now

@gaogaotiantian gaogaotiantian merged commit 80ca28f into gaogaotiantian:master Dec 5, 2024
29 checks passed
@gaogaotiantian
Copy link
Owner

Thank you for your contribution!

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.

Torch events have wrong time offset on certain machines
2 participants