Skip to content

chumicro-runner

A tick-based task runner for CircuitPython, MicroPython, and CPython — no async required.

Components implement a check(now_ms) -> bool check that gates when a handler fires. A Runner captures time once per tick, checks each service, and batch-fires all due handlers.

Quick example

from chumicro_runner import Runner

runner = Runner()
runner.add_periodic(lambda now_ms: print("one second"), period_ms=1000)
runner.add_periodic(lambda now_ms: print("five seconds"), period_ms=5000)

while True:
    runner.tick()

Documentation