Eclipse SUMO - Simulation of Urban MObility
StopWatch< TimeT, ClockT > Class Template Reference

#include <StopWatch.h>

Public Member Functions

void add (const StopWatch< TimeT, ClockT > &other)
 
long long int elapsed () const
 
long long int getAverage () const
 
const std::vector< TimeT > & getHistory () const
 
long long int getTotal () const
 
void start ()
 
long long int stop ()
 
 StopWatch (const bool calibrate=false)
 

Private Attributes

std::chrono::time_point< ClockT > myEnd
 
std::vector< TimeT > myHistory
 
std::chrono::time_point< ClockT > myStart
 
TimeT myTimingCost
 

Detailed Description

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
class StopWatch< TimeT, ClockT >

Definition at line 35 of file StopWatch.h.

Constructor & Destructor Documentation

◆ StopWatch()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
StopWatch< TimeT, ClockT >::StopWatch ( const bool  calibrate = false)
inline

Member Function Documentation

◆ add()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
void StopWatch< TimeT, ClockT >::add ( const StopWatch< TimeT, ClockT > &  other)
inline

Definition at line 63 of file StopWatch.h.

References StopWatch< TimeT, ClockT >::myHistory.

Referenced by MSEdgeControl::~MSEdgeControl().

Here is the caller graph for this function:

◆ elapsed()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
long long int StopWatch< TimeT, ClockT >::elapsed ( ) const
inline

Definition at line 57 of file StopWatch.h.

References StopWatch< TimeT, ClockT >::myEnd, StopWatch< TimeT, ClockT >::myHistory, StopWatch< TimeT, ClockT >::myStart, and StopWatch< TimeT, ClockT >::myTimingCost.

Referenced by StopWatch< TimeT, ClockT >::stop().

Here is the caller graph for this function:

◆ getAverage()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
long long int StopWatch< TimeT, ClockT >::getAverage ( ) const
inline

Definition at line 71 of file StopWatch.h.

References StopWatch< TimeT, ClockT >::myHistory.

Referenced by MSEdgeControl::~MSEdgeControl().

Here is the caller graph for this function:

◆ getHistory()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
const std::vector<TimeT>& StopWatch< TimeT, ClockT >::getHistory ( ) const
inline

Definition at line 67 of file StopWatch.h.

References StopWatch< TimeT, ClockT >::myHistory.

Referenced by MSEdgeControl::~MSEdgeControl().

Here is the caller graph for this function:

◆ getTotal()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
long long int StopWatch< TimeT, ClockT >::getTotal ( ) const
inline

Definition at line 75 of file StopWatch.h.

References StopWatch< TimeT, ClockT >::myHistory.

Referenced by MSEdgeControl::~MSEdgeControl().

Here is the caller graph for this function:

◆ start()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
void StopWatch< TimeT, ClockT >::start ( )
inline

Definition at line 48 of file StopWatch.h.

References StopWatch< TimeT, ClockT >::myEnd, and StopWatch< TimeT, ClockT >::myStart.

Referenced by StopWatch< TimeT, ClockT >::StopWatch().

Here is the caller graph for this function:

◆ stop()

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
long long int StopWatch< TimeT, ClockT >::stop ( )
inline

Field Documentation

◆ myEnd

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
std::chrono::time_point<ClockT> StopWatch< TimeT, ClockT >::myEnd
private

◆ myHistory

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
std::vector<TimeT> StopWatch< TimeT, ClockT >::myHistory
mutableprivate

◆ myStart

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
std::chrono::time_point<ClockT> StopWatch< TimeT, ClockT >::myStart
private

◆ myTimingCost

template<typename TimeT = std::chrono::milliseconds, typename ClockT = std::chrono::steady_clock>
TimeT StopWatch< TimeT, ClockT >::myTimingCost
private

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