From e942e35d833d2cc44baff46f38328d02504b3437 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Sat, 12 Oct 2019 12:41:01 -0500 Subject: [PATCH] Timeout compensates for the lag induced by showing notifications --- ctabus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctabus/__init__.py b/ctabus/__init__.py index 9eac761..7f605fc 100644 --- a/ctabus/__init__.py +++ b/ctabus/__init__.py @@ -284,6 +284,7 @@ def _main_periodic(args, stop_id, init_data): while not _done: try: try: + s = time.perf_counter() show( data, args.route, @@ -291,7 +292,6 @@ def _main_periodic(args, stop_id, init_data): args.toast and HAS_TOAST, args.notifications and HAS_NOTIFICATION, ) - s = time.perf_counter() timeout = 1 if args.periodic > timeout: timeout = args.periodic