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 clock for measuring passed time #1448

Closed
wants to merge 1 commit into from

Conversation

ledestin
Copy link

@ledestin ledestin commented Dec 1, 2014

Hello,

Capybara uses real clock to measure time which leads to races when clock is moved 1 hour ahead. This pull requests switches Capybara to use monotonic clock, which doesn't have such problems.

I've used a gem (that depends on hitimes) because supported Ruby includes 1.9.3 and monotonic clock is introduced only in Ruby 2.

@twalpole
Copy link
Member

twalpole commented Dec 8, 2014

Looking at the monotonic_times gem it doesnt seem to provide enough added benefit to justify including it rather than just using hitimes directly. I need to read up on any platform issues that may be involved here, and it may just make more sense to use Process.clock_getTime directly when running on ruby 2.1+

@ledestin
Copy link
Author

ledestin commented Dec 8, 2014

Your call. I personally think that Process.clock_gettime(Process::CLOCK_MONOTONIC) is way too long to repeat more than a single time.

@twalpole
Copy link
Member

Closing in favor of the lesser dependencies (and admittedly lesser platform support) in PR #1503

@twalpole twalpole closed this Apr 14, 2015
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

2 participants