fix: changed from datetime to monotonic for more reliable timestamp #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #180
Summary of Changes
I changed the time format used for checking if a new drop has occurred. This is because datetime.now().timestamp() generates a timestamp based on the current system time reported by the system clock, which can be inaccurate if something happens with that clock. Instead, I used time.monotonic(), which is based on a monotonic clock that provides a consistent measure of time. I'm not sure if this will fix the bug that some people have reported, but it is generally a better way to do this.
Additional context
Discord username (if different from GitHub): Rektile#7582
Testing instructions
Check if session drops go up. Hard to check because not everyone has the bug.
How to download the PR for testing
Using GitHub CLI
gh pr checkout 181
(Requires GitHub CLI)Using regular GIT
git fetch origin pull/<PR_NUMBER>/head:<LOCAL_BRANCH_NAME>
(e.g.git fetch origin pull/110/head:notif
)git checkout <LOCAL_BRANCH_NAME>
(e.g.git checkout notif
)