Timer¶
-
class
dolfin.cpp.common.
Timer
(*args)¶ Bases:
object
A timer can be used for timing tasks. The basic usage is
Timer
timer(“Assembling over cells”); The timer is started at construction and timing ends when the timer is destroyed (goes out of scope). It is also possible to start and stop a timer explicitly by timer.start(); timer.stop(); Timings are stored globally and a summary may be printed by callinglist_timings
;Create timer with logging.
Parameters: task (std::string) – -
elapsed
()¶ Return wall, user and system time in seconds. Wall-clock time has precision around 1 microsecond; user and system around 10 millisecond.
Return type: std::tuple< double, double, double >
-
resume
()¶ Resume timer. Not well-defined for logging timer.
Return type: void
-
start
()¶ Zero and start timer.
Return type: void
-
stop
()¶ Stop timer, return wall time elapsed and store timing data into logger
Return type: double
-
thisown
¶ The membership flag
-