gemseo.utils.timer module#

A timer to measure the time spent within a with statement.

class 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.

property elapsed_time: float#

The time spent within the with statement.