TR-mbed 1.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Eigen::BenchTimer Class Reference

#include <BenchTimer.h>

Public Member Functions

 BenchTimer ()
 
 ~BenchTimer ()
 
void reset ()
 
void start ()
 
void stop ()
 
double value (int TIMER=CPU_TIMER) const
 
double best (int TIMER=CPU_TIMER) const
 
double worst (int TIMER=CPU_TIMER) const
 
double total (int TIMER=CPU_TIMER) const
 
double getCpuTime () const
 
double getRealTime () const
 

Protected Attributes

Vector2d m_starts
 
Vector2d m_times
 
Vector2d m_bests
 
Vector2d m_worsts
 
Vector2d m_totals
 

Detailed Description

Elapsed time timer keeping the best try.

On POSIX platforms we use clock_gettime with CLOCK_PROCESS_CPUTIME_ID. On Windows we use QueryPerformanceCounter

Important: on linux, you must link with -lrt

Constructor & Destructor Documentation

◆ BenchTimer()

Eigen::BenchTimer::BenchTimer ( )
inline

◆ ~BenchTimer()

Eigen::BenchTimer::~BenchTimer ( )
inline

Member Function Documentation

◆ best()

double Eigen::BenchTimer::best ( int  TIMER = CPU_TIMER) const
inline

Return the best elapsed time in seconds

◆ getCpuTime()

double Eigen::BenchTimer::getCpuTime ( ) const
inline

◆ getRealTime()

double Eigen::BenchTimer::getRealTime ( ) const
inline

◆ reset()

void Eigen::BenchTimer::reset ( )
inline

◆ start()

void Eigen::BenchTimer::start ( )
inline

◆ stop()

void Eigen::BenchTimer::stop ( )
inline

◆ total()

double Eigen::BenchTimer::total ( int  TIMER = CPU_TIMER) const
inline

Return the total elapsed time in seconds.

◆ value()

double Eigen::BenchTimer::value ( int  TIMER = CPU_TIMER) const
inline

Return the elapsed time in seconds between the last start/stop pair

◆ worst()

double Eigen::BenchTimer::worst ( int  TIMER = CPU_TIMER) const
inline

Return the worst elapsed time in seconds

Member Data Documentation

◆ m_bests

Vector2d Eigen::BenchTimer::m_bests
protected

◆ m_starts

Vector2d Eigen::BenchTimer::m_starts
protected

◆ m_times

Vector2d Eigen::BenchTimer::m_times
protected

◆ m_totals

Vector2d Eigen::BenchTimer::m_totals
protected

◆ m_worsts

Vector2d Eigen::BenchTimer::m_worsts
protected

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