Public Member Functions | Protected Attributes | List of all members
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 <timings.h>

Public Member Functions

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

Protected Attributes

bool m_is_stopped
 
CPUTimes m_times
 

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.

Definition at line 31 of file coal/timings.h.

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

Definition at line 41 of file coal/timings.h.

Member Function Documentation

◆ elapsed()

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

Definition at line 45 of file coal/timings.h.

◆ is_stopped()

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

Definition at line 99 of file coal/timings.h.

◆ resume()

void coal::Timer::resume ( )
inline

Definition at line 90 of file coal/timings.h.

◆ start()

void coal::Timer::start ( )
inline

Definition at line 65 of file coal/timings.h.

◆ stop()

void coal::Timer::stop ( )
inline

Definition at line 76 of file coal/timings.h.

Member Data Documentation

◆ m_is_stopped

bool coal::Timer::m_is_stopped
protected

Definition at line 103 of file coal/timings.h.

◆ m_times

CPUTimes coal::Timer::m_times
protected

Definition at line 102 of file coal/timings.h.


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


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:45:00