Speed up and reduce memory footprint of debug template

This commit is contained in:
xs5871 2023-03-15 22:28:36 +00:00 committed by xs5871
parent 3e13c8c321
commit 76e6feda6f

View File

@ -16,8 +16,10 @@ class Debug:
def __init__(self, name: str = __name__): def __init__(self, name: str = __name__):
self.name = name self.name = name
def __call__(self, message: str) -> None: def __call__(self, *message: str) -> None:
print(f'{ticks_ms()} {self.name}: {message}') print(ticks_ms(), end=' ')
print(self.name, end=': ')
print(*message)
@property @property
def enabled(self) -> bool: def enabled(self) -> bool: