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

Resolve a problem in F2/Setup update interval adjustments #1511

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

natoscott
Copy link
Member

The halfdelay(3X) curses function ultimately drives the update interval that htop samples values and refreshes at. This is a bit complicated by interrupts generated from other places (key or mouse events), however if halfdelay is not explicitly called at some point soon after changing the interval it does not get correctly updated during that session.

Since the delay setting is persisted, on restart htop actually does honour the change from the previous invocation, confusing the situation even further.

With this commit the update is reflected immediately in the UI as well now.

Fixes: #1510

@BenBE BenBE added the enhancement Extension or improvement to existing feature label Aug 5, 2024
@BenBE BenBE added this to the 3.4.0 milestone Aug 5, 2024
@BenBE BenBE added bug 🐛 Something isn't working and removed enhancement Extension or improvement to existing feature labels Aug 5, 2024
The halfdelay(3X) curses function ultimately drives the update
interval that htop samples values and refreshes at.  This is a
bit complicated by interrupts generated from other places (key
or mouse events), however if halfdelay is not explicitly called
at some point soon after changing the interval it does not get
correctly updated during that session.

Since the delay setting is persisted, on restart htop actually
does honour the change from the previous invocation, confusing
the situation even further.

With this commit the update is reflected immediately in the UI
as well now.

Fixes: htop-dev#1510
No reason to have two pointers when one will do the trick,
and the code becomes a little less obfuscated as a result.
@BenBE BenBE merged commit 81432ba into htop-dev:main Aug 5, 2024
18 checks passed
@natoscott natoscott deleted the fix-delay-updates branch August 5, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fractional update intervals do not work
2 participants