OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Timer Class Reference

Instance of this class is used for measure time consumtion of block code until instance is alive and write result to debug output. More...

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Timer.hpp>

Collaboration diagram for Slic3r::Timer:

Public Member Functions

 Timer (const std::string &name)
 name describe timer
 ~Timer ()
 name describe timer

Private Attributes

std::string m_name
std::chrono::steady_clock::time_point m_start

Detailed Description

Instance of this class is used for measure time consumtion of block code until instance is alive and write result to debug output.

Constructor & Destructor Documentation

◆ Timer()

Slic3r::Timer::Timer ( const std::string & name)

name describe timer

Parameters
nameDescribe timer in consol log
8: m_name(name), m_start(steady_clock::now()) {}
std::string m_name
Definition Timer.hpp:17
std::chrono::steady_clock::time_point m_start
Definition Timer.hpp:18

References m_name, and m_start.

◆ ~Timer()

Slic3r::Timer::~Timer ( )

name describe timer

11{
12 BOOST_LOG_TRIVIAL(debug) << "Timer '" << m_name << "' spend " <<
13 duration_cast<milliseconds>(steady_clock::now() - m_start).count() << "ms";
14}

References m_name, and m_start.

Member Data Documentation

◆ m_name

std::string Slic3r::Timer::m_name
private

Referenced by Timer(), and ~Timer().

◆ m_start

std::chrono::steady_clock::time_point Slic3r::Timer::m_start
private

Referenced by Timer(), and ~Timer().


The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Timer.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Timer.cpp