Public Member Functions | Private Attributes | List of all members
oomph::Timer Class Reference

Timer. More...

#include <oomph_utilities.h>

Public Member Functions

 Timer (const unsigned &n_timer)
 Constructor: Specify number of timers. More...
 
void start (const unsigned &i)
 (Re-)start i-th timer More...
 
void halt (const unsigned &i)
 Halt i-th timer. More...
 
double cumulative_time (const unsigned &i)
 Report time accumulated by i-th timer. More...
 
void reset (const unsigned &i)
 Reset i-th timer. More...
 
void reset ()
 Reset all timers. More...
 
void set_ntimers (const unsigned &ntimers)
 Set number of timings that can be recorded in parallel. More...
 

Private Attributes

Vector< clock_t > Timing
 Cumulative timings. More...
 
Vector< clock_t > Start_time
 Start times of active timers. More...
 

Detailed Description

Timer.

Definition at line 311 of file oomph_utilities.h.

Constructor & Destructor Documentation

oomph::Timer::Timer ( const unsigned &  n_timer)
inline

Constructor: Specify number of timers.

Definition at line 317 of file oomph_utilities.h.

References oomph::CumulativeTimings::set_ntimers().

Member Function Documentation

double oomph::Timer::cumulative_time ( const unsigned &  i)
inline

Report time accumulated by i-th timer.

Definition at line 335 of file oomph_utilities.h.

References oomph::CumulativeTimings::Timing.

void oomph::Timer::halt ( const unsigned &  i)
inline

Halt i-th timer.

Definition at line 329 of file oomph_utilities.h.

References i, oomph::CumulativeTimings::Start_time, and oomph::CumulativeTimings::Timing.

void oomph::Timer::reset ( const unsigned &  i)
inline

Reset i-th timer.

Definition at line 341 of file oomph_utilities.h.

References i, and oomph::CumulativeTimings::Timing.

void oomph::Timer::reset ( )
inline

Reset all timers.

Definition at line 347 of file oomph_utilities.h.

References i, and oomph::CumulativeTimings::Timing.

void oomph::Timer::set_ntimers ( const unsigned &  ntimers)
inline

Set number of timings that can be recorded in parallel.

Definition at line 357 of file oomph_utilities.h.

References oomph::CumulativeTimings::Start_time, and oomph::CumulativeTimings::Timing.

void oomph::Timer::start ( const unsigned &  i)
inline

(Re-)start i-th timer

Definition at line 323 of file oomph_utilities.h.

References i, and oomph::CumulativeTimings::Start_time.

Member Data Documentation

Vector<clock_t> oomph::Timer::Start_time
private

Start times of active timers.

Definition at line 369 of file oomph_utilities.h.

Vector<clock_t> oomph::Timer::Timing
private

Cumulative timings.

Definition at line 366 of file oomph_utilities.h.


The documentation for this class was generated from the following file: