From 5ac849d00eef29182ed810454497445963a3f80d Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Thu, 8 Feb 2024 08:06:50 +0100 Subject: [PATCH] Use pyplot's pause due to its event loop --- fosdem_video_progress.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fosdem_video_progress.py b/fosdem_video_progress.py index 9634bec..9a6dcd4 100755 --- a/fosdem_video_progress.py +++ b/fosdem_video_progress.py @@ -6,7 +6,6 @@ import json from datetime import datetime from dataclasses import dataclass from collections import defaultdict -from time import sleep from pathlib import Path api_url = r'https://review.video.fosdem.org/api/v1/event/1/overview' @@ -63,7 +62,7 @@ def main(): plt.stackplot(x, *ys) plt.show(block=False) - sleep(poll_rate) + plt.pause(poll_rate) plt.close() plt.clf()