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

Add subtractIdleTimeoutOnIdle flag #296

Open
d9k opened this issue Oct 31, 2022 · 1 comment
Open

Add subtractIdleTimeoutOnIdle flag #296

d9k opened this issue Oct 31, 2022 · 1 comment
Labels
awaiting response Requires additional context or information. enhancement A new feature or improvement to an existing feature.

Comments

@d9k
Copy link

d9k commented Oct 31, 2022

1) With new flag

Initialization

timeout: 1000ms
subtractIdleTimeoutOnIdle: true

Test algo

  1. active 5000ms
  2. idle 2000ms

Expected result

getTotalActiveTime(): 5000ms
getTotalIdleTime(): 2000ms

2) Without new flag

Initialization

timeout: 1000ms
subtractIdleTimeoutOnIdle: false

Test algo

  1. active 5000ms
  2. idle 2000ms

Expected result

getTotalActiveTime(): 6000ms
getTotalIdleTime(): 1000ms
@d9k d9k added enhancement A new feature or improvement to an existing feature. triage Has not been reviewed yet and should not be worked on. labels Oct 31, 2022
@SupremeTechnopriest
Copy link
Owner

Im pretty sure this is the default behavior. Looking at my tests, the idle time isnt timestamped until after the idle event fires. Meaning the timeout value counts toward active time and not idle time. Can you create a code sandbox that demonstrates the issue?

@SupremeTechnopriest SupremeTechnopriest added awaiting response Requires additional context or information. and removed triage Has not been reviewed yet and should not be worked on. labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Requires additional context or information. enhancement A new feature or improvement to an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants