Ignition Common

API Reference

4.1.0

A timer class, used to time things in real world walltime. More...

#include <common/common.hh>

Public Member Functions

 Timer ()
 Constructor. More...
 
virtual ~Timer ()
 Destructor. More...
 
Time Elapsed () const
 Get the elapsed time. More...
 
std::chrono::duration< double > ElapsedTime () const
 Get the elapsed time. More...
 
bool Running () const
 Returns true if the timer is running. More...
 
virtual void Start ()
 Start the timer. More...
 
virtual void Stop ()
 Stop the timer. More...
 

Friends

std::ostreamoperator<< (std::ostream &out, const Timer &t)
 Stream operator friendly. More...
 

Detailed Description

A timer class, used to time things in real world walltime.

Constructor & Destructor Documentation

◆ Timer()

Timer ( )

Constructor.

◆ ~Timer()

virtual ~Timer ( )
virtual

Destructor.

Member Function Documentation

◆ Elapsed()

Time Elapsed ( ) const

Get the elapsed time.

Returns
The time

◆ ElapsedTime()

std::chrono::duration<double> ElapsedTime ( ) const

Get the elapsed time.

Returns
The elapsed time

◆ Running()

bool Running ( ) const

Returns true if the timer is running.

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

◆ Start()

virtual void Start ( )
virtual

Start the timer.

◆ Stop()

virtual void Stop ( )
virtual

Stop the timer.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream out,
const Timer t 
)
friend

Stream operator friendly.


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