cmd: don't shadow time module

This commit is contained in:
Jörg Thalheim
2025-05-02 15:09:51 +02:00
parent f5277c989a
commit f6899166c7

View File

@@ -244,12 +244,12 @@ class TimeTable:
# Print in default color # Print in default color
print(f"Took {v} for command: '{k}'") print(f"Took {v} for command: '{k}'")
def add(self, cmd: str, time: float) -> None: def add(self, cmd: str, duration: float) -> None:
with self.lock: with self.lock:
if cmd in self.table: if cmd in self.table:
self.table[cmd] += time self.table[cmd] += duration
else: else:
self.table[cmd] = time self.table[cmd] = duration
TIME_TABLE = None TIME_TABLE = None
@@ -423,6 +423,3 @@ def run_no_stdout(
cmd, cmd,
opts, opts,
) )
# type: ignore