polybar-dwm/include
Malte Bargholz a625e2b79a
fix(timer_module): sleep until next full interval (#2123)
Any timer_module based module would sleep for the set interval and then
continue running. Depending on the start time of polybar this
sleep pattern might not be aligned, which causes such modules to always
update in a shifted manner.
Consider the date module as an example. If the update interval is set to
60 seconds and polybar was started at 13:37:37, polybar would update the
clock at 13:38:37, 13:39:37 and so on.
To make matters worse, if a module would perform lengthy checks this
interval might drift over time, causing even more inconsistent updating.

This patch extends the base module with a sleep_until method that calls
the corresponding function on the sleephandler. Additionally the
timer_module is extended to compute the remaining time until the next
interval passes and sleep accordingly.

Closes #2064

Co-developed-by: Dominik Töllner <dominik.toellner@stud.uni-hannover.de>

Co-authored-by: Malte Bargholz <malte@screenri.de>
2020-06-20 22:15:25 +02:00
..
adapters feat(pulse): Show volume in decibels (#1894) 2019-10-09 02:13:57 +02:00
cairo font: Show context in unmatched character warning 2020-01-07 16:28:07 +01:00
components refactor: Deprecate throttle-input-for setting (#2117) 2020-05-30 22:45:36 +02:00
drawtypes fix(battery): animation framerate 2020-01-23 23:45:56 +01:00
events Incorporate Reviews 2019-08-06 21:36:20 +02:00
modules fix(timer_module): sleep until next full interval (#2123) 2020-06-20 22:15:25 +02:00
utils Fix gcc compilation 2020-05-14 22:45:40 +02:00
x11 fix(xworkspaces): Assign desktops to correct viewport 2020-05-01 18:46:02 +02:00
CMakeLists.txt build: remove xdamage extension 2019-06-03 00:46:12 +02:00
common.hpp refactor(build): Remove version number namespace 2019-05-17 16:49:47 +02:00
debug.hpp refactor: Cleanup 2017-01-11 03:07:28 +01:00
errors.hpp Add missing <stdexcept> header 2019-12-25 01:00:29 +01:00
settings.hpp.cmake ipc: Remove unused global setting 2019-11-01 11:12:40 +01:00