timer module¶
A timer to measure the time spent within a with
statement.
- class gemseo.utils.timer.Timer(log_level=None)[source]¶
Bases:
object
A timer to measure the time spent within a
with
statement.Examples
- with Timer() as timer:
# do stuff
elapsed_time = timer.elapsed_time
- Parameters:
log_level (int | None) – The level of the logger. If
None
, do not log the elapsed time.