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

fix: changed from datetime to monotonic for more reliable timestamp #181

Closed
wants to merge 1 commit into from

Conversation

rektile
Copy link
Contributor

@rektile rektile commented Feb 24, 2023

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

  1. Clone this PR
  2. Run gh pr checkout 181 (Requires GitHub CLI)
  3. Follow the Advanced Installation Guides from the Wiki

Using regular GIT

  1. Fetch the PR git fetch origin pull/<PR_NUMBER>/head:<LOCAL_BRANCH_NAME> (e.g. git fetch origin pull/110/head:notif)
  2. Checkout the branch git checkout <LOCAL_BRANCH_NAME> (e.g. git checkout notif)
  3. Follow the Advanced Installation Guides from the Wiki

@rektile
Copy link
Contributor Author

rektile commented Feb 25, 2023

I noticed this will not work when checking with the timers from riot.

@rektile rektile closed this Feb 25, 2023
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 this pull request may close these issues.

[Bug]: Session drop counter not working correctly
1 participant