ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Private Types
MyTimer::OneTimer Class Reference

nested class of MyTimer, contains the timers functions More...

#include <MyTimer.h>

Collaboration diagram for MyTimer::OneTimer:
Collaboration graph
[legend]

Public Member Functions

Contructor
 OneTimer ()
 default constructor. More...
 
 ~OneTimer ()
 destructor More...
 
Getter/Setter
unsigned int GetNumberCalls ()
 Get the number of calls. More...
 
std::vector< double > GetAllTimes ()
 Get all computed times. More...
 
Starting and Stopping one timer
void Start ()
 Start the timer. More...
 
void Stop ()
 Stop the timer. More...
 
void Reset ()
 reset the timer More...
 

Private Types

typedef std::chrono::duration
< double, std::milli > 
duration_dtt
 
typedef
std::chrono::time_point
< std::chrono::steady_clock,
std::chrono::duration< double,
std::ratio< 1, 1000000000 > > > 
tpoint
 

Private Attributes

time variable
tpoint start_t
 time_point, starting time More...
 
tpoint stop_t
 time_point, stopping time More...
 
duration_dtt total_t
 total time, a duration More...
 
unsigned int n_call
 number of calls to stop/start More...
 

Detailed Description

nested class of MyTimer, contains the timers functions

Definition at line 80 of file MyTimer.h.

Member Typedef Documentation

typedef std::chrono::duration<double, std::milli> MyTimer::OneTimer::duration_dtt
private

Definition at line 89 of file MyTimer.h.

typedef std::chrono::time_point< std::chrono::steady_clock, std::chrono::duration<double, std::ratio<1, 1000000000> > > MyTimer::OneTimer::tpoint
private

Definition at line 97 of file MyTimer.h.

Constructor & Destructor Documentation

MyTimer::OneTimer::OneTimer ( )

default constructor.

Postcondition
total_t duration is set to 0

Definition at line 110 of file MyTimer.cpp.

References n_call, start_t, stop_t, and total_t.

MyTimer::OneTimer::~OneTimer ( )

destructor

Definition at line 131 of file MyTimer.cpp.

Member Function Documentation

std::vector< double > MyTimer::OneTimer::GetAllTimes ( )

Get all computed times.

  • Total time
  • Average time by execution
  • Min time
  • Max time

Definition at line 240 of file MyTimer.cpp.

Referenced by MyTimer::GetAverageTime(), MyTimer::GetTotalTime(), and MyTimer::Report().

Here is the caller graph for this function:

unsigned int MyTimer::OneTimer::GetNumberCalls ( )
inline

Get the number of calls.

Definition at line 125 of file MyTimer.h.

References n_call.

Referenced by MyTimer::GetNumberCalls(), and MyTimer::Report().

Here is the caller graph for this function:

void MyTimer::OneTimer::Reset ( )

reset the timer

Definition at line 230 of file MyTimer.cpp.

Referenced by MyTimer::Reset().

Here is the caller graph for this function:

void MyTimer::OneTimer::Start ( )

Start the timer.

Definition at line 139 of file MyTimer.cpp.

Referenced by MyTimer::Start().

Here is the caller graph for this function:

void MyTimer::OneTimer::Stop ( )

Stop the timer.

Definition at line 174 of file MyTimer.cpp.

Referenced by MyTimer::Stop().

Here is the caller graph for this function:

Field Documentation

unsigned int MyTimer::OneTimer::n_call
private

number of calls to stop/start

Definition at line 108 of file MyTimer.h.

Referenced by GetNumberCalls(), and OneTimer().

tpoint MyTimer::OneTimer::start_t
private

time_point, starting time

Definition at line 102 of file MyTimer.h.

Referenced by OneTimer().

tpoint MyTimer::OneTimer::stop_t
private

time_point, stopping time

Definition at line 104 of file MyTimer.h.

Referenced by OneTimer().

duration_dtt MyTimer::OneTimer::total_t
private

total time, a duration

Definition at line 106 of file MyTimer.h.

Referenced by OneTimer().


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