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

GetLoadedTime does not reset time #6

Open
DaveA50 opened this issue Mar 13, 2023 · 0 comments
Open

GetLoadedTime does not reset time #6

DaveA50 opened this issue Mar 13, 2023 · 0 comments

Comments

@DaveA50
Copy link

DaveA50 commented Mar 13, 2023

When resetting the CPU data (by clicking the gear button), the time does not reset to that moment but stays as time since last UI reload. This skews the calls/sec data negatively from reality after clicking it once. Changing the function CPU:GetLoadedTime() to instead
return max(floor(GetTime() - self.loadedtime or ElvUI.loadedtime), 1) on line 109 lets the updated CPU.loadedtime call on line 262 to be used for these calculations instead of the constant time since UI reload. The max function is needed to avoid divide by zero issues.

This does not fix the calculations when doing a manual garbage dump (like shift-clicking the system datatext provided by ElvUI) which will still exhibit the incorrect timing as it is currently (since CPU.loadedtime isn't updated when doing this).

Maybe this is the intended behavior as Sympy alluded to in discord, but I think this change generally makes the data in the calls/sec column more accurate and valuable.

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

No branches or pull requests

1 participant