From ae44e9495e54ca0de34895d69bb333189bb27ba5 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sun, 11 Feb 2024 15:58:35 +0100 Subject: [PATCH] Processor usage reduction --- bt-audioparser/bt-audioparser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bt-audioparser/bt-audioparser.py b/bt-audioparser/bt-audioparser.py index e95520f..343f513 100644 --- a/bt-audioparser/bt-audioparser.py +++ b/bt-audioparser/bt-audioparser.py @@ -4,6 +4,7 @@ import mqtt import report import select from systemd import journal +import time try: @@ -53,4 +54,5 @@ if __name__ == "__main__": if PLAY in entry['MESSAGE']: playing = True send_state_msg_mqtt(mc, playing) - logger.debug(str(entry['__REALTIME_TIMESTAMP'] )+ ' ' + entry['MESSAGE']) \ No newline at end of file + logger.debug(str(entry['__REALTIME_TIMESTAMP'] )+ ' ' + entry['MESSAGE']) + time.sleep(0.1)