Wildmeshing Toolkit
|
#include <Stopwatch.hpp>
Public Member Functions | |
StopWatch (const std::string &name) | |
StopWatch (const std::string &name, const spdlog::level::level_enum log_level) | |
virtual | ~StopWatch () |
void | start () |
void | stop () |
template<typename T = std::chrono::seconds> | |
int64_t | getElapsedTime () |
void | log_msg () |
Private Attributes | |
std::string | m_name |
spdlog::level::level_enum | m_log_level = spdlog::level::info |
std::chrono::high_resolution_clock::time_point | m_start |
std::chrono::high_resolution_clock::time_point | m_stop |
bool | m_is_running = false |
Definition at line 10 of file Stopwatch.hpp.
wmtk::utils::StopWatch::StopWatch | ( | const std::string & | name | ) |
Definition at line 9 of file Stopwatch.cpp.
wmtk::utils::StopWatch::StopWatch | ( | const std::string & | name, |
const spdlog::level::level_enum | log_level | ||
) |
Definition at line 13 of file Stopwatch.cpp.
References start().
|
virtual |
Definition at line 20 of file Stopwatch.cpp.
References log_msg(), m_is_running, and stop().
|
inline |
Definition at line 37 of file Stopwatch.hpp.
|
inline |
Definition at line 43 of file Stopwatch.cpp.
References wmtk::logger(), m_log_level, and m_name.
Referenced by ~StopWatch().
void wmtk::utils::StopWatch::start | ( | ) |
Definition at line 28 of file Stopwatch.cpp.
References m_is_running, and m_start.
Referenced by StopWatch().
void wmtk::utils::StopWatch::stop | ( | ) |
Definition at line 34 of file Stopwatch.cpp.
References m_is_running, and m_stop.
Referenced by ~StopWatch().
|
private |
Definition at line 33 of file Stopwatch.hpp.
Referenced by start(), stop(), and ~StopWatch().
|
private |
Definition at line 29 of file Stopwatch.hpp.
Referenced by log_msg().
|
private |
Definition at line 28 of file Stopwatch.hpp.
Referenced by log_msg().
|
private |
Definition at line 30 of file Stopwatch.hpp.
Referenced by getElapsedTime(), and start().
|
private |
Definition at line 31 of file Stopwatch.hpp.
Referenced by getElapsedTime(), and stop().