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

time: remove cached elapsed value from driver state #6097

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

satakuma
Copy link
Member

The time driver stores the number of elapsed units of time in a variable and keeps it in sync with the same counter inside the timer wheel. Since the variable is only used to ensure that we poll the timer wheel with monotonic instants, we may as well use the actual counter from the wheel and avoid redundancy.

@github-actions github-actions bot added the R-loom-time-driver Run loom time driver tests on this PR label Oct 22, 2023
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-time Module: tokio/time labels Oct 22, 2023
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Darksonn Darksonn merged commit 61fcc3b into tokio-rs:master Nov 5, 2023
78 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-time Module: tokio/time R-loom-time-driver Run loom time driver tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants