Class used to measure runtime performance and log molecule updates per second (MUPS).
More...
#include <Timer.h>
|
| | Timer () |
| | Constructs a new Timer.
|
| |
| void | reset () |
| | Resets the start time.
|
| |
| template<typename T > |
| auto | elapsed () const |
| | Gets the elapsed time since the start.
|
| |
| void | incrementMoleculeUpdates (long summand) |
| | Increments the total number of molecule updates by a given amount.
|
| |
| void | printElapsed () const |
| | Prints the elapsed time.
|
| |
| void | printMUPS () const |
| | Prints the molecule updates per second.
|
| |
|
| std::chrono::time_point< std::chrono::high_resolution_clock > | m_start |
| | The start time of the timing process.
|
| |
| long | m_moleculeUpdates {0} |
| | The total number of molecule updates in the given timeframe.
|
| |
Class used to measure runtime performance and log molecule updates per second (MUPS).
◆ Timer()
◆ elapsed()
template<typename T >
| auto Timer::elapsed |
( |
| ) |
const |
|
inline |
Gets the elapsed time since the start.
- Template Parameters
-
| T | The unit of measurement to be returned (e.g. milliseconds, seconds...). |
- Returns
- The time passed since the stored start time.
◆ incrementMoleculeUpdates()
| void Timer::incrementMoleculeUpdates |
( |
long |
summand | ) |
|
|
inline |
Increments the total number of molecule updates by a given amount.
- Parameters
-
| summand | The amount to add to the molecule update counter. |
◆ printElapsed()
| void Timer::printElapsed |
( |
| ) |
const |
|
inline |
◆ printMUPS()
| void Timer::printMUPS |
( |
| ) |
const |
|
inline |
Prints the molecule updates per second.
◆ reset()
◆ m_moleculeUpdates
| long Timer::m_moleculeUpdates {0} |
|
private |
The total number of molecule updates in the given timeframe.
◆ m_start
| std::chrono::time_point<std::chrono::high_resolution_clock> Timer::m_start |
|
private |
The start time of the timing process.
The documentation for this class was generated from the following file: