Bridge++  Ver. 2.0.2
Timer Class Reference

#include <timer.h>

Public Member Functions

 Timer (const std::string &id="", const bool report=false)
 
 ~Timer ()
 
void start ()
 
void stop ()
 
void reset ()
 
double elapsed_sec () const
 
double elapsed_msec () const
 
unsigned long get_counter () const
 
void report (const Bridge::VerboseLevel vl=Bridge::GENERAL)
 

Static Public Member Functions

static void timestamp ()
 

Static Public Attributes

static const std::string class_name = "Timer"
 

Private Member Functions

 Timer (const Timer &)
 
Timeroperator= (const Timer &)
 

Private Attributes

bool is_started
 
double m_start
 
double m_elapsed
 
unsigned long m_counter
 
std::string m_id
 
bool m_report_on_exit
 

Detailed Description

Definition at line 31 of file timer.h.

Constructor & Destructor Documentation

◆ Timer() [1/2]

Timer::Timer ( const std::string &  id = "",
const bool  report = false 
)
inline

Definition at line 37 of file timer.h.

◆ ~Timer()

Timer::~Timer ( )

Definition at line 37 of file timer.cpp.

◆ Timer() [2/2]

Timer::Timer ( const Timer )
private

Member Function Documentation

◆ elapsed_msec()

double Timer::elapsed_msec ( ) const

Definition at line 114 of file timer.cpp.

◆ elapsed_sec()

double Timer::elapsed_sec ( ) const

Definition at line 107 of file timer.cpp.

◆ get_counter()

unsigned long Timer::get_counter ( ) const

Definition at line 121 of file timer.cpp.

◆ operator=()

Timer& Timer::operator= ( const Timer )
private

◆ report()

void Timer::report ( const Bridge::VerboseLevel  vl = Bridge::GENERAL)

Definition at line 128 of file timer.cpp.

◆ reset()

void Timer::reset ( )

Definition at line 97 of file timer.cpp.

◆ start()

void Timer::start ( )

Definition at line 44 of file timer.cpp.

◆ stop()

void Timer::stop ( )

Definition at line 69 of file timer.cpp.

◆ timestamp()

void Timer::timestamp ( )
static

Definition at line 19 of file timer.cpp.

Member Data Documentation

◆ class_name

const std::string Timer::class_name = "Timer"
static

Definition at line 34 of file timer.h.

◆ is_started

bool Timer::is_started
private

Definition at line 65 of file timer.h.

◆ m_counter

unsigned long Timer::m_counter
private

Definition at line 69 of file timer.h.

◆ m_elapsed

double Timer::m_elapsed
private

Definition at line 68 of file timer.h.

◆ m_id

std::string Timer::m_id
private

Definition at line 71 of file timer.h.

◆ m_report_on_exit

bool Timer::m_report_on_exit
private

Definition at line 72 of file timer.h.

◆ m_start

double Timer::m_start
private

Definition at line 66 of file timer.h.


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