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: Replace existing timing with workspace:GetServerTimeNow(), resolve race condition with server creating event after client load #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chexburger
Copy link

This PR fixes a timing issue resulting from the use of tick() using local timezones instead of universal time. It also fixes timing issues with os.clock() being different on the server and client from client time drift by using a synchronized time provided by the server.
Additionally this fixes a race condition that causes a client error when the server is slower than the client to require the module.

@chexburger
Copy link
Author

chexburger commented Nov 3, 2024

The version is not bumped up in this PR and should be adjusted prior to merging.
I tested this solution with a client that had the correct time and a client that was 2 seconds behind real time. Both encountered identical and desired behavior when switching to :GetServerTimeNow().

This will resolve #10

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.

1 participant