Closed tobast closed 10 months ago
Rebased on master, now that #1158 is merged
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?
I'm closing this PR to keep the code simpler. If we need this some time, we can always apply it later
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: