(solver: AocSolution)
| 7 | |
| 8 | def main(day: str) -> Callable[[AocSolution], Callable[[],None]]: |
| 9 | def decorator(solver: AocSolution) -> Callable[[],None]: |
| 10 | def timer() -> None: |
| 11 | indata = (INPUT_DIR / f'{day}.in').read_text() |
| 12 | start = time.time() |
| 13 | p1, p2 = solver(indata.rstrip('\n')) |
| 14 | elapsed = int((time.time() - start) * 1000) |
| 15 | print(f"Part 1: {p1}") |
| 16 | print(f"Part 2: {p2}") |
| 17 | print(f"Time: {elapsed}ms") |
| 18 | return timer |
| 19 | return decorator |
nothing calls this directly
no outgoing calls
no test coverage detected