Browse Source

Timeout compensates for the lag induced by showing notifications

atexit
Raphael Roberts 6 years ago
parent
commit
e942e35d83
  1. 2
      ctabus/__init__.py

2
ctabus/__init__.py

@ -284,6 +284,7 @@ def _main_periodic(args, stop_id, init_data):
while not _done: while not _done:
try: try:
try: try:
s = time.perf_counter()
show( show(
data, data,
args.route, args.route,
@ -291,7 +292,6 @@ def _main_periodic(args, stop_id, init_data):
args.toast and HAS_TOAST, args.toast and HAS_TOAST,
args.notifications and HAS_NOTIFICATION, args.notifications and HAS_NOTIFICATION,
) )
s = time.perf_counter()
timeout = 1 timeout = 1
if args.periodic > timeout: if args.periodic > timeout:
timeout = args.periodic timeout = args.periodic

Loading…
Cancel
Save