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 GC.total_time example #5193

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Fix GC.total_time example #5193

merged 1 commit into from
Nov 29, 2021

Conversation

nobu
Copy link
Member

@nobu nobu commented Nov 29, 2021

The result may increase actually or not, since GC can finish shorter than the timer granularity.

The result may increase actually or not.
@nobu nobu merged commit ac8647b into ruby:master Nov 29, 2021
@nobu nobu deleted the GC.total_time-spec branch November 29, 2021 23:49
@eregon
Copy link
Member

eregon commented Nov 30, 2021

Can GC.start be faster than 1 nanosecond?
Or rather the timer granularity is much worse on Windows?

@nobu
Copy link
Member Author

nobu commented Nov 30, 2021

The unit doesn't mean the granularity.
Windows provides "high resolution timer", but trade-off with the performance and power usage, IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants