Lagrange
ScopedTimer Class Reference

Similar to a VerboseTimer, but uses RAII to call tick()/tock(). More...

#include <lagrange/utils/timing.h>

Public Member Functions

 ScopedTimer (std::string prefix, spdlog::logger *log=nullptr, spdlog::level::level_enum level=spdlog::level::debug)
 Constructs a new instance. More...
 
 ScopedTimer (ScopedTimer &&)=default
 
ScopedTimeroperator= (ScopedTimer &&)=default
 

Detailed Description

Similar to a VerboseTimer, but uses RAII to call tick()/tock().

Constructor & Destructor Documentation

◆ ScopedTimer()

ScopedTimer ( std::string  prefix,
spdlog::logger *  log = nullptr,
spdlog::level::level_enum  level = spdlog::level::debug 
)
inline

Constructs a new instance.

Parameters
[in]prefixPrefix name to prepend to each log message. Defaults to empty string.
[in]logOptional logger to use. Defaults to the lagrange logger.
[in]levelLog level to use. Defaults to debug.

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