From 78f1ca77c7a3de9c01a2c706713b9c657f352e0f Mon Sep 17 00:00:00 2001 From: Nils Rokita <0rokita@informatik.uni-hamburg.de> Date: Tue, 27 Nov 2018 15:59:37 +0100 Subject: [PATCH] modeslive: fix hight CPU usage The core loop in modeslive is currently busy waiting for updates I think an update rate at 50Hz is more reasonable and reduces cpu usage. --- pyModeS/streamer/modeslive | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyModeS/streamer/modeslive b/pyModeS/streamer/modeslive index 1447e05..5ee6438 100644 --- a/pyModeS/streamer/modeslive +++ b/pyModeS/streamer/modeslive @@ -3,6 +3,7 @@ from __future__ import print_function, division import os import sys +import time import argparse import curses from threading import Lock @@ -95,6 +96,7 @@ try: try: screen.update_data(acs) screen.update() + time.sleep(0.02) except KeyboardInterrupt: raise except: