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 timestamp/duration unit confusion #921

Merged
merged 9 commits into from
Apr 4, 2024
Merged

Fix timestamp/duration unit confusion #921

merged 9 commits into from
Apr 4, 2024

Conversation

Jake-Shadle
Copy link
Collaborator

I made a big mistake in #896 by changing the units of various timestamps from nanoseconds -> seconds, which caused QCMP distances to be completely wrong as the unit change caused all calculations to be 0. This fixes the bug by actually having a modicum of type safety so that all conversions between timestamps and duration/nanoseconds are clear as opposed to "losing" the units. It also changes the qcmp::ping test to force a delay and ensure that the calculated time is both less than twice the delay but also greater than the delay, which was why this bug was not detected by the test.

Resolves: #920

@github-actions github-actions bot added the size/l label Apr 3, 2024
@Jake-Shadle Jake-Shadle changed the title Fix timestamp confusion Fix timestamp/duration unit confusion Apr 3, 2024
@Jake-Shadle Jake-Shadle enabled auto-merge (squash) April 3, 2024 14:52
@Jake-Shadle Jake-Shadle merged commit 3a84cef into main Apr 4, 2024
11 checks passed
@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 909ba8bb-70cc-4e96-b8ab-aacdfeed4230

The following development images have been built, and will exist for the next 30 days:

To build this version:

git fetch [email protected]:googleforgames/quilkin.git pull/921/head:pr_921 && git checkout pr_921
cargo build

@Jake-Shadle Jake-Shadle deleted the fix-timestamps branch April 4, 2024 10:47
@markmandel markmandel added kind/bug Something isn't working area/operations Installation, updating, metrics etc labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operations Installation, updating, metrics etc kind/bug Something isn't working size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QCMP pings seem to be returning the wrong information.
4 participants