dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.52k stars 338 forks source link

Turn of second threshold tolerance #1167

Closed tobast closed 10 months ago

tobast commented 1 year ago

This patch was first included in PR #1158. The notifications' age is updated at each turn of second, but sometimes, the sleep between two loop turns will be slightly (a fraction of ms most of the time) shorter than what was requested, resulting in a loop run just before the turn of second. In this case, to avoid doing nothing and requesting a very short sleep until the turn of second, this PR introduces a slight tolerance:

tobast commented 1 year ago

Rebased on master, now that #1158 is merged

fwsmit commented 1 year ago

I'm wondering if it's worth to merge this. The advantage of this PR is that it avoids waking up twice in a short timespan. But the disadvantage is that it adds some complexity and has to possibility to add a bug. What do you think. Should this be merged?

fwsmit commented 10 months ago

I'm closing this PR to keep the code simpler. If we need this some time, we can always apply it later