How hh-mwb/timerun works
TimeRun is a single-file Python timing library. A developer uses Timer as a context manager or decorator; it measures wall-clock and CPU time and produces a Measurement containing TimeSpan values and optional metadata. Decorator mode retains recent measurements, while optional callbacks run at measurement start and end. The README and sampled source establish these behaviors; implementation details beyond the excerpt are not mapped.
Main entry points: timerun.py Timer
Components 8
Other components
- Developer code
- Timer
timerun.py - Measured code
- Measurement
timerun.py - TimeSpan
timerun.py - User callbacks
- Measurement deque
timerun.py - System clocks
Connections 8
- Developer code → Timer: uses
- Timer → Measured code: wraps or scopes
- Timer → System clocks: reads
- Timer → Measurement: creates and updates
- Timer → TimeSpan: records durations
- Timer → User callbacks: invokes
- Timer → Measurement deque: appends measurements
- Timer → Developer code: yields measurement