coal  3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
coal::Timer Struct Reference

This class mimics the way "boost/timer/timer.hpp" operates while using the modern std::chrono library. Importantly, this class will only have an effect for C++11 and more. More...

#include <coal/timings.h>

Collaboration diagram for coal::Timer:

Public Member Functions

 Timer (const bool start_on_construction=true)
 Default constructor for the timer. More...
 
CPUTimes elapsed () const
 
void start ()
 
void stop ()
 
void resume ()
 
bool is_stopped () const
 

Protected Attributes

CPUTimes m_times
 
bool m_is_stopped
 

Detailed Description

This class mimics the way "boost/timer/timer.hpp" operates while using the modern std::chrono library. Importantly, this class will only have an effect for C++11 and more.

Constructor & Destructor Documentation

◆ Timer()

coal::Timer::Timer ( const bool  start_on_construction = true)
inline

Default constructor for the timer.

Parameters
[in]start_on_constructionif true, the timer will be run just after the object is created

Member Function Documentation

◆ elapsed()

CPUTimes coal::Timer::elapsed ( ) const
inline

◆ is_stopped()

bool coal::Timer::is_stopped ( ) const
inline

◆ resume()

void coal::Timer::resume ( )
inline

◆ start()

void coal::Timer::start ( )
inline

◆ stop()

void coal::Timer::stop ( )
inline

Member Data Documentation

◆ m_is_stopped

bool coal::Timer::m_is_stopped
protected

◆ m_times

CPUTimes coal::Timer::m_times
protected

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