DiagnosticTimer Class Reference

A timer designed for diagnostics. More...

#include <util/util.hh>

Inherits Timer.

Public Member Functions

 DiagnosticTimer (const std::string &_name)
 Constructor. More...
 
virtual ~DiagnosticTimer ()
 Destructor. More...
 
Time GetElapsed () const
 Get the elapsed time. More...
 
bool GetRunning () const
 Returns true if the timer is running. More...
 
void InsertData (const std::string &_name, const common::Time &_time)
 Insert data for statistics computation. More...
 
void Lap (const std::string &_prefix)
 Output a lap time. More...
 
const std::string Name () const
 Get the name of the timer. More...
 
void Reset ()
 Reset the timer. More...
 
virtual void Start ()
 Start the timer. More...
 
virtual void Stop ()
 Stop the timer. More...
 

Detailed Description

A timer designed for diagnostics.

Constructor & Destructor Documentation

◆ DiagnosticTimer()

DiagnosticTimer ( const std::string &  _name)
explicit

Constructor.

Parameters
[in]_nameName of the timer

◆ ~DiagnosticTimer()

virtual ~DiagnosticTimer ( )
virtual

Destructor.

Member Function Documentation

◆ GetElapsed()

Time GetElapsed ( ) const
inherited

Get the elapsed time.

Returns
The time

◆ GetRunning()

bool GetRunning ( ) const
inherited

Returns true if the timer is running.

Returns
Tue if the timer has been started and not stopped.

◆ InsertData()

void InsertData ( const std::string &  _name,
const common::Time _time 
)

Insert data for statistics computation.

◆ Lap()

void Lap ( const std::string &  _prefix)

Output a lap time.

Parameters
[in]_prefixAnnotation to output with the elapsed time.

◆ Name()

const std::string Name ( ) const

Get the name of the timer.

Returns
The name of timer

◆ Reset()

void Reset ( )
inherited

Reset the timer.

◆ Start()

virtual void Start ( )
virtual

Start the timer.

Reimplemented from Timer.

◆ Stop()

virtual void Stop ( )
virtual

Stop the timer.

Reimplemented from Timer.


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