Creates a verbose timer that prints after tock().
More...
#include <lagrange/utils/timing.h>
|
| | VerboseTimer (std::string prefix="", spdlog::logger *log=nullptr, spdlog::level::level_enum level=spdlog::level::debug) |
| | Constructs a new instance. More...
|
| |
|
void | tick () |
| | Starts the timer.
|
| |
| double | tock (const std::string name="") |
| | Stops the timer. More...
|
| |
Creates a verbose timer that prints after tock().
◆ VerboseTimer()
| VerboseTimer |
( |
std::string |
prefix = "", |
|
|
spdlog::logger * |
log = nullptr, |
|
|
spdlog::level::level_enum |
level = spdlog::level::debug |
|
) |
| |
|
inline |
Constructs a new instance.
- Parameters
-
| [in] | prefix | Prefix name to prepend to each log message. Defaults to empty string. |
| [in] | log | Optional logger to use. Defaults to the lagrange logger. |
| [in] | level | Log level to use. Defaults to debug. |
◆ tock()
| double tock |
( |
const std::string |
name = "" | ) |
|
|
inline |
Stops the timer.
- Parameters
-
| [in] | name | Name of the message to show. |
- Returns
- The elapsed time in seconds.
The documentation for this class was generated from the following file: