DUNE: Uniform Navigational Environment  2019.02.1
DUNE::Time::Counter< T > Class Template Reference

Detailed Description

template<typename T>
class DUNE::Time::Counter< T >

Simple time counter.

This class checks if the amount of time elapsed since the last call to reset() is greater than the top value.

Public Member Functions

 Counter (T top=0.0)
 
void setTop (T top)
 
getTop (void) const
 
reset (void)
 
bool overflow (void)
 
getRemaining (void) const
 
getElapsed (void) const
 

Constructor & Destructor Documentation

template<typename T>
DUNE::Time::Counter< T >::Counter ( top = 0.0)
inline

Constructor.

Parameters
topcounter's top value.

Member Function Documentation

template<typename T>
T DUNE::Time::Counter< T >::getElapsed ( void  ) const
inline

Get elapsed time.

Returns
elapsed time (s).

Referenced by DUNE::Hardware::BasicDeviceDriver::BasicDeviceDriver().

template<typename T>
T DUNE::Time::Counter< T >::getRemaining ( void  ) const
inline
template<typename T>
T DUNE::Time::Counter< T >::getTop ( void  ) const
inline

Get top value.

Returns
counter's top value.
Collaboration diagram for DUNE::Time::Counter< T >:
Collaboration graph