Timer.h

Note

The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.

class Timer

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 calling

list_timings();
Timer(std::string task)

Create timer

void start()

Start timer

double stop()

Stop timer

double value() const

Return value of timer (or time at start if not stopped)