NeoPZ
Public Member Functions | Private Attributes | Friends | List of all members
TPZMultiTimer Class Reference

Controls several timers at once. Utility. More...

#include <TPZTimer.h>

Public Member Functions

 TPZMultiTimer (int nT)
 Default constructor. More...
 
 ~TPZMultiTimer ()
 Destructor. More...
 
int nTimers () const
 Number of active timers. More...
 
TPZTimergetTimer (int i)
 Returns a specific timer. More...
 
const TPZTimergetTimer (int i) const
 Returns a specific timer. More...
 
std::string & processName (int i)
 Gets the process name (for reporting purposes). More...
 
const std::string & processName (int i) const
 Gets the process name (for reporting purposes). More...
 
void start (int i)
 Turns the timer on. More...
 
void start ()
 Turns the timer on. More...
 
void stop (int i)
 Turns the timer off, and computes the elapsed time. More...
 
void stop ()
 Turns the timer off, and computes the elapsed time. More...
 
void reset (int i)
 Zeroes the timer. More...
 
void reset ()
 Zeroes the timer. More...
 
double seconds (int i) const
 Returns the elapsed time in seconds. More...
 

Private Attributes

std::vector< TPZTimertimers
 Vector of timers. More...
 

Friends

std::ostream & operator<< (std::ostream &Out, const TPZMultiTimer &t)
 Prints the time nicely formated. More...
 

Detailed Description

Controls several timers at once. Utility.

Warning
Check its behavior on non-GNU systems.

Definition at line 100 of file TPZTimer.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  Out,
const TPZMultiTimer t 
)
friend

Prints the time nicely formated.

Definition at line 78 of file TPZTimer.cpp.

Member Data Documentation

◆ timers

std::vector< TPZTimer > TPZMultiTimer::timers
private

Vector of timers.

Definition at line 153 of file TPZTimer.h.

Referenced by getTimer(), nTimers(), processName(), reset(), seconds(), start(), stop(), and TPZMultiTimer().


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