#include <oomph_utilities.h>
Public Member Functions | |
Timer (const unsigned &n_timer) | |
Constructor: Specify number of timers. | |
void | start (const unsigned &i) |
(Re-)start i-th timer | |
void | halt (const unsigned &i) |
Halt i-th timer. | |
double | cumulative_time (const unsigned &i) |
Report time accumulated by i-th timer. | |
void | reset (const unsigned &i) |
Reset i-th timer. | |
void | reset () |
Reset all timers. | |
void | set_ntimers (const unsigned &ntimers) |
Set number of timings that can be recorded in parallel. | |
Private Attributes | |
Vector< clock_t > | Timing |
Cumulative timings. | |
Vector< clock_t > | Start_time |
Start times of active timers. | |
Definition at line 365 of file oomph_utilities.h.
Constructor: Specify number of timers.
Definition at line 369 of file oomph_utilities.h.
References set_ntimers().
Report time accumulated by i-th timer.
Definition at line 387 of file oomph_utilities.h.
Halt i-th timer.
Definition at line 381 of file oomph_utilities.h.
References i, Start_time, and Timing.
|
inline |
Set number of timings that can be recorded in parallel.
Definition at line 409 of file oomph_utilities.h.
References Start_time, and Timing.
Referenced by Timer().
(Re-)start i-th timer
Definition at line 375 of file oomph_utilities.h.
References i, and Start_time.
Start times of active timers.
Definition at line 420 of file oomph_utilities.h.
Referenced by halt(), set_ntimers(), and start().
Cumulative timings.
Definition at line 417 of file oomph_utilities.h.
Referenced by cumulative_time(), halt(), reset(), reset(), and set_ntimers().