Class used to measure run time of the program. More...

#include <RunTimeMeasurment.hpp>

Public Member Functions

 RunTimeMeasurment ()
 Constructor. More...
 
void getTime (std::string)
 Records time. More...
 
 ~RunTimeMeasurment ()
 Destructor. More...
 

Private Member Functions

void timeDisplay (double)
 Helper class. More...
 

Private Attributes

std::chrono::time_point< std::chrono::system_clock > start_
 Recorded moment of object creation. More...
 
std::chrono::time_point< std::chrono::system_clock > last_
 Recorded moment of object last time measurement. More...
 

Detailed Description

Class used to measure run time of the program.

RunTimeMeasurment measures time from the creation of the instance to its deconstruction. One can also check the time during the lifetime of the object.

All informations are printed in console.

Examples:
algebraicBootstrapperExample.cpp, bootstrapperComparison.cpp, constrainedBootstrapperExample.cpp, rootFindingBootstrapperExample.cpp, and unconstrainedBootstrapperExample.cpp.

Constructor & Destructor Documentation

julian::RunTimeMeasurment::RunTimeMeasurment ( )

Constructor.

Constructor records the moment when the object was created.

julian::RunTimeMeasurment::~RunTimeMeasurment ( )

Destructor.

Destructor prints the length of lifetime of the object.

Member Function Documentation

void julian::RunTimeMeasurment::getTime ( std::string  s = "")

Records time.

Prints the time that passed from the moment the object's creation and time that passed from last measurement. One can add a commentary that will be printed on console.

void julian::RunTimeMeasurment::timeDisplay ( double  time)
private

Helper class.

Methods formats the time from milliseconds to format hh:mm:ss:ms

Member Data Documentation

std::chrono::time_point<std::chrono::system_clock> julian::RunTimeMeasurment::last_
private

Recorded moment of object last time measurement.

std::chrono::time_point<std::chrono::system_clock> julian::RunTimeMeasurment::start_
private

Recorded moment of object creation.


The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/jULIAN/src/utils/RunTimeMeasurment.hpp
  • C:/Unix/home/OEM/jULIAN/src/utils/RunTimeMeasurment.cpp