MROB
Public Member Functions | Protected Attributes | List of all members
mrob::TimeProfiling Class Reference

#include <time_profiling.hpp>

Public Member Functions

 TimeProfiling ()
 
 ~TimeProfiling ()
 
void reset ()
 
void start ()
 
void stop (const std::string &key="")
 
void print ()
 
double total_time ()
 

Protected Attributes

std::chrono::steady_clock::time_point t1_
 
std::vector< std::pair< std::string, double > > time_profiles_
 

Detailed Description

Class TimeProfiling creates a simple object that stores time profiles for different functions and displays them.

Constructor & Destructor Documentation

◆ TimeProfiling()

TimeProfiling::TimeProfiling ( )

Constructor, no parameters reqauired

◆ ~TimeProfiling()

TimeProfiling::~TimeProfiling ( )

Destructor, nothing to free

Member Function Documentation

◆ print()

void TimeProfiling::print ( )

print: displays the information gathered so far

◆ reset()

void TimeProfiling::reset ( )

Reset method

◆ start()

void TimeProfiling::start ( )

start TODO add here the key?

◆ stop()

void TimeProfiling::stop ( const std::string &  key = "")

stop() records given the string the time spent since last start() call

◆ total_time()

double TimeProfiling::total_time ( )

total_time: returns the number of microsecond accumulated in the class


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