From f2a233474409eb0f39fd5e4906bafb92eebe93d4 Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Mon, 5 Feb 2024 09:52:02 +0200 Subject: Fixing delay testing not to rely on actual time elapsed. --- tui/tui.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tui/tui.py') diff --git a/tui/tui.py b/tui/tui.py index 6b3eb33..9e4c9c5 100644 --- a/tui/tui.py +++ b/tui/tui.py @@ -1,6 +1,7 @@ """ tui/tui.py - runko käyttöliittymälle """ # pylint: disable = multiple-imports -from time import sleep +#from time import sleep +import time from .static import Action from .kbd import Kbd, NoKbd from .ansi_draw import AnsiDraw, SuppressDraw @@ -60,7 +61,7 @@ class Tui(): if action != Action.NOOP: if self.delay: self.draw.matrix(matrix, x, y) - sleep(self.delay/100) + time.sleep(self.delay/100) return Action.OPEN if action==Action.SAFE else action, x, y -- cgit v1.2.3