Time¶
This submodule provide a class to easily manipulate time.
- class biom3d.utils.time.Time(name: str | None = None)[source]¶
Simple utility class to measure elapsed time across multiple events.
Useful for timing loops, function calls, or sections of code with optional naming and usage tracking (via a counter).
- Variables:
name (str) – Name of the timer instance.
start_time (float) – Timestamp when the timer was last reset.
count (int) – Number of times .get() or __str__() has been called.
- __init__(name: str | None = None)[source]¶
Initialize time.
- Parameters:
name (str, optional) – Optional name identifier for the timer (used in __str__ debug output).