""" Null/headless display backend. """ import time class NullDisplay: """Headless/null display - discards all output. This display does nothing - useful for headless benchmarking or when no display output is needed. """ width: int = 80 height: int = 24 def init(self, width: int, height: int, reuse: bool = False) -> None: """Initialize display with dimensions. Args: width: Terminal width in characters height: Terminal height in rows reuse: Ignored for NullDisplay (no resources to reuse) """ 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