linjmeyer / tilt-pitch

Simple replacement for the Tilt Hydrometer mobile apps and TiltPi with lots of features
GNU General Public License v3.0
51 stars 16 forks source link

Added sleep when queue is empty to reduce CPU usage #24

Closed linjmeyer closed 3 years ago

linjmeyer commented 3 years ago

Closes #23.

Reduces CPU usage by sleeping when the queue is empty. This ensures Pitch uses CPU as needed when Tilt broadcasts are in the queue but still reduces CPU time by not looping endlessly to check if the queue has new items.

Sleep duration can be configured. Sleep duration of 0 or lower disables the feature.