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 truncation #3874

Conversation

Archez
Copy link
Contributor

@Archez Archez commented Jan 23, 2024

Our timestamp function using chrono was downcasting a long long to a long before finally casting it up to uint64_t (which is unsigned long long). This was causing the timestamp values to be truncated to 32 bits. Visually the in-game timers still displayed "ok" since it was comparing truncated value against truncated.

This change removes the down cast to prevent the truncation. After this merge, any save created before that was using RTA timing will display a large difference, but that in my opinion is not a big deal because most people aren't playing RTA timing across updates/many days apart from creation.

Build Artifacts

@leggettc18
Copy link
Contributor

The CI is failing because it can't download SDL, not sure what's going on there exactly.

@leggettc18
Copy link
Contributor

Third times the charm!

@garrettjoecox garrettjoecox merged commit 7ef6a43 into HarbourMasters:develop-macready Feb 2, 2024
9 checks passed
@Archez Archez deleted the fix-timestamp-truncation branch February 23, 2024 21:57
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.

None yet

4 participants