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

use monotonic time instead of system time for timers in the IoReactor #271

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

Conversation

Roguelazer
Copy link
Contributor

@Roguelazer Roguelazer commented Jul 22, 2022

This prevents strange timeouts around leap seconds (if you're not using a splaying ntp server), and also allows you to use this driver along with tools like Timecop in testing, since Timecop manipulates Time but not Monotime.

This adds a new dependency (https://github.com/Freaky/monotime), which has a minimum-supported Ruby version of 2.5. Given that everything before Ruby 2.7 is EOL already anyway, this seems okay, but there might be some value in changing the README for ruby-driver and the testing to reflect modern versions of Ruby. I could also switch to hires, but I tend to use monotime for ergonomic reasons.

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