Skip to content

Populate recent time once before starting upkeep thread. #94

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

Closed
tobz opened this issue Oct 30, 2023 · 0 comments · Fixed by #95
Closed

Populate recent time once before starting upkeep thread. #94

tobz opened this issue Oct 30, 2023 · 0 comments · Fixed by #95

Comments

@tobz
Copy link
Member

tobz commented Oct 30, 2023

During some testing in #92, it was discovered that the initial call to set recent time can take unexpectedly long, which leaves the initial recent time at 0, which can lead to the first delta attempt using recent time (i.e. let start = Clock::recent(); ...; let delta = start.elapsed()) being unexpectedly large.

We should do a single call to populate recent time before we spawn the actual upkeep thread, so that we're anchored as close as we possibly can be to the true time, rather than just having the initial value of zero.

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 a pull request may close this issue.

1 participant