Timer< T > Class Template Reference

#include <sot/core/timer.hh>

Inheritance diagram for Timer< T >:
[legend]

Public Member Functions

virtual const std::string & getClassName (void) const
 
 Timer (const std::string &name)
 
virtual void display (std::ostream &os) const
 

Public Attributes

dg::SignalPtr< T, int > sigSIN
 
dg::SignalTimeDependent< T, int > sigSOUT
 
dg::SignalTimeDependent< T, int > sigClockSOUT
 
dg::Signal< double, int > timerSOUT
 

Static Public Attributes

static const std::string CLASS_NAME
 

Protected Member Functions

void plug (dg::Signal< T, int > &sig)
 
template<bool UseClock>
T & compute (T &t, const int &time)
 
double & getDt (double &res, const int &)
 

Protected Attributes

struct timeval t0 t1
 
clock_t c0
 
clock_t c1
 
double dt
 

Friends

Timer_EXPORT friend std::ostream & operator<< (std::ostream &os, const Timer< T > &timer)
 

Constructor & Destructor Documentation

◆ Timer()

Member Function Documentation

◆ compute()

template<class T>
template<bool UseClock>
T& Timer< T >::compute ( T &  t,
const int &  time 
)
inlineprotected

References sotDEBUG, sotDEBUGIN, and sotDEBUGOUT.

◆ display()

template<class T >
void Timer< T >::display ( std::ostream &  os) const
virtual

◆ getClassName()

template<class T>
virtual const std::string& Timer< T >::getClassName ( void  ) const
inlinevirtual

◆ getDt()

template<class T>
double& Timer< T >::getDt ( double &  res,
const int &   
)
inlineprotected

References cmdChrono().

Referenced by Timer< T >::Timer().

◆ plug()

template<class T>
void Timer< T >::plug ( dg::Signal< T, int > &  sig)
inlineprotected

Friends And Related Function Documentation

◆ operator<<

template<class T>
Timer_EXPORT friend std::ostream& operator<< ( std::ostream &  os,
const Timer< T > &  timer 
)
friend

Member Data Documentation

◆ c0

template<class T>
clock_t Timer< T >::c0
protected

◆ c1

template<class T>
clock_t Timer< T >::c1
protected

◆ CLASS_NAME

template<class T>
const std::string Timer< T >::CLASS_NAME
static

◆ dt

template<class T>
double Timer< T >::dt
protected

Referenced by Timer< T >::display().

◆ sigClockSOUT

template<class T>
dg::SignalTimeDependent<T, int> Timer< T >::sigClockSOUT

Referenced by Timer< T >::Timer().

◆ sigSIN

template<class T>
dg::SignalPtr<T, int> Timer< T >::sigSIN

◆ sigSOUT

template<class T>
dg::SignalTimeDependent<T, int> Timer< T >::sigSOUT

Referenced by Timer< T >::Timer().

◆ t1

template<class T>
struct timeval t0 Timer< T >::t1
protected

◆ timerSOUT

template<class T>
dg::Signal<double, int> Timer< T >::timerSOUT

Referenced by Timer< T >::Timer().