A wrapper around autopas::utils::Timer that only compiles implementation logic if the SPDLOG_ACTIVE_LEVEL is set to TRACE.
More...
#include <TraceTimer.h>
|
| void | start () |
| | start the timer.
|
| |
| long | stop () |
| | Stops the timer and returns the time elapsed in nanoseconds since the last call to start.
|
| |
| void | reset () |
| | Resets the timer to 0.
|
| |
| void | addTime (long nanoseconds) |
| | Adds the given amount of nanoseconds to the total time.
|
| |
| long | getTotalTime () const |
| | Get total accumulated time.
|
| |
A wrapper around autopas::utils::Timer that only compiles implementation logic if the SPDLOG_ACTIVE_LEVEL is set to TRACE.
For a higher log level, functions are empty and will be removed by the compiler.
◆ addTime()
| void autopas::utils::TraceTimer::addTime |
( |
long |
nanoseconds | ) |
|
|
inline |
Adds the given amount of nanoseconds to the total time.
- Parameters
-
◆ getTotalTime()
| long autopas::utils::TraceTimer::getTotalTime |
( |
| ) |
const |
|
inline |
Get total accumulated time.
- Returns
- Total time in nano seconds.
◆ reset()
| void autopas::utils::TraceTimer::reset |
( |
| ) |
|
|
inline |
◆ start()
| void autopas::utils::TraceTimer::start |
( |
| ) |
|
|
inline |
◆ stop()
| long autopas::utils::TraceTimer::stop |
( |
| ) |
|
|
inline |
Stops the timer and returns the time elapsed in nanoseconds since the last call to start.
It also adds the duration to the total time.
- Returns
- elapsed time in nanoseconds
The documentation for this class was generated from the following file: