""" Null/headless display backend. """ import time class NullDisplay: """Headless/null display - discards all output.""" width: int = 80 height: int = 24 def init(self, width: int, height: int) -> None: self.width = width self.height = height def show(self, buffer: list[str]) -> None: from engine.display import get_monitor monitor = get_monitor() if monitor: t0 = time.perf_counter() chars_in = sum(len(line) for line in buffer) elapsed_ms = (time.perf_counter() - t0) * 1000 monitor.record_effect("null_display", elapsed_ms, chars_in, chars_in) def clear(self) -> None: pass def cleanup(self) -> None: pass