4#include <spdlog/fmt/bundled/color.h>
10#define POLYFEM_SCOPED_TIMER(...) polyfem::utils::Timer __polyfem_timer(__VA_ARGS__)
18 operator double()
const {
return time; }
56 Timer(
const std::string &name,
double &total_time)
94 return m_timer.getElapsedTimeInSec();
99 const static std::string log_fmt_text =
100 fmt::format(
"[{}] {{}} {{:.3g}}s", fmt::format(fmt::fg(fmt::terminal_color::magenta),
"timing"));
const igl::Timer & igl_timer()
Timer(const std::string &name, Timing &timing)
Timer(const std::string &name, double &total_time)
Timer(double &total_time)
Timer(const std::string &name)
double getElapsedTimeInSec()
spdlog::logger & logger()
Retrieves the current logger.
void operator+=(const double t)