Skip to content

time: remove cached elapsed value from driver state#6097

Merged
Darksonn merged 1 commit intotokio-rs:masterfrom
satakuma:remove-cached-elapsed
Nov 5, 2023
Merged

time: remove cached elapsed value from driver state#6097
Darksonn merged 1 commit intotokio-rs:masterfrom
satakuma:remove-cached-elapsed

Conversation

@satakuma
Copy link
Copy Markdown
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
Copy Markdown
Member

@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
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