gemseo / utils

Hide inherited members

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 (str | 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.