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 time #149

Open
wapiflapi opened this issue Jan 26, 2022 · 0 comments · May be fixed by #150
Open

Use monotonic time #149

wapiflapi opened this issue Jan 26, 2022 · 0 comments · May be fixed by #150

Comments

@wapiflapi
Copy link

Backoff uses timedelta.total_seconds(datetime.datetime.now() - start) to compute elapsed time which is used to figure out if max_time has been reached. This is flaky and doesn't work well when the system clock is being updated: when adjusting time from the network or adjusting to daylight saving time for example.

Instead monotonic time should be used, using for example https://docs.python.org/3/library/time.html#time.monotonic

@wapiflapi wapiflapi linked a pull request Jan 26, 2022 that will close this issue
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