Browse Source

Processor usage reduction

master
Dirk Alders 11 months ago
parent
commit
ae44e9495e
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      bt-audioparser/bt-audioparser.py

+ 3
- 1
bt-audioparser/bt-audioparser.py View File

4
 import report
4
 import report
5
 import select
5
 import select
6
 from systemd import journal
6
 from systemd import journal
7
+import time
7
 
8
 
8
 
9
 
9
 try:
10
 try:
53
                         if PLAY in entry['MESSAGE']:
54
                         if PLAY in entry['MESSAGE']:
54
                             playing = True
55
                             playing = True
55
                             send_state_msg_mqtt(mc, playing)
56
                             send_state_msg_mqtt(mc, playing)
56
-                    logger.debug(str(entry['__REALTIME_TIMESTAMP'] )+ ' ' + entry['MESSAGE'])
57
+                    logger.debug(str(entry['__REALTIME_TIMESTAMP'] )+ ' ' + entry['MESSAGE'])
58
+        time.sleep(0.1)

Loading…
Cancel
Save