PolyFEM
Loading...
Searching...
No Matches
polyfem::utils::Timer Class Reference

#include <Timer.hpp>

Public Member Functions

 Timer ()
 
 Timer (const std::string &name)
 
 Timer (double &total_time)
 
 Timer (Timing &timing)
 
 Timer (const std::string &name, double &total_time)
 
 Timer (const std::string &name, Timing &timing)
 
virtual ~Timer ()
 
void start ()
 
void stop ()
 
double getElapsedTimeInSec ()
 
void log_msg ()
 
const igl::Timer & igl_timer ()
 

Protected Attributes

std::string m_name
 
igl::Timer m_timer
 
double * m_total_time = nullptr
 
size_t * m_count = nullptr
 
bool is_running = false
 

Detailed Description

Definition at line 30 of file Timer.hpp.

Constructor & Destructor Documentation

◆ Timer() [1/6]

polyfem::utils::Timer::Timer ( )
inline

Definition at line 33 of file Timer.hpp.

References start().

Here is the call graph for this function:

◆ Timer() [2/6]

polyfem::utils::Timer::Timer ( const std::string &  name)
inline

Definition at line 38 of file Timer.hpp.

References start().

Here is the call graph for this function:

◆ Timer() [3/6]

polyfem::utils::Timer::Timer ( double &  total_time)
inline

Definition at line 44 of file Timer.hpp.

References start().

Here is the call graph for this function:

◆ Timer() [4/6]

polyfem::utils::Timer::Timer ( Timing timing)
inline

Definition at line 50 of file Timer.hpp.

References start().

Here is the call graph for this function:

◆ Timer() [5/6]

polyfem::utils::Timer::Timer ( const std::string &  name,
double &  total_time 
)
inline

Definition at line 56 of file Timer.hpp.

References start().

Here is the call graph for this function:

◆ Timer() [6/6]

polyfem::utils::Timer::Timer ( const std::string &  name,
Timing timing 
)
inline

Definition at line 62 of file Timer.hpp.

References start().

Here is the call graph for this function:

◆ ~Timer()

virtual polyfem::utils::Timer::~Timer ( )
inlinevirtual

Definition at line 68 of file Timer.hpp.

References stop().

Here is the call graph for this function:

Member Function Documentation

◆ getElapsedTimeInSec()

double polyfem::utils::Timer::getElapsedTimeInSec ( )
inline

Definition at line 92 of file Timer.hpp.

References m_timer.

Referenced by log_msg(), and stop().

Here is the caller graph for this function:

◆ igl_timer()

const igl::Timer & polyfem::utils::Timer::igl_timer ( )
inline

Definition at line 108 of file Timer.hpp.

References m_timer.

◆ log_msg()

void polyfem::utils::Timer::log_msg ( )
inline

Definition at line 97 of file Timer.hpp.

References getElapsedTimeInSec(), polyfem::logger(), and m_name.

Referenced by stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

void polyfem::utils::Timer::start ( )
inline

◆ stop()

void polyfem::utils::Timer::stop ( )
inline

Definition at line 79 of file Timer.hpp.

References getElapsedTimeInSec(), is_running, log_msg(), m_count, m_timer, and m_total_time.

Referenced by polyfem::mesh::PhysicsRemesher< WMTKMesh >::collapse_edge_after(), polyfem::mesh::PhysicsRemesher< WMTKMesh >::smooth_after(), polyfem::mesh::PhysicsRemesher< WMTKMesh >::split_edge_after(), polyfem::mesh::PhysicsTriRemesher::swap_edge_after(), and ~Timer().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ is_running

bool polyfem::utils::Timer::is_running = false
protected

Definition at line 118 of file Timer.hpp.

Referenced by start(), and stop().

◆ m_count

size_t* polyfem::utils::Timer::m_count = nullptr
protected

Definition at line 117 of file Timer.hpp.

Referenced by stop().

◆ m_name

std::string polyfem::utils::Timer::m_name
protected

Definition at line 114 of file Timer.hpp.

Referenced by log_msg().

◆ m_timer

igl::Timer polyfem::utils::Timer::m_timer
protected

Definition at line 115 of file Timer.hpp.

Referenced by getElapsedTimeInSec(), igl_timer(), start(), and stop().

◆ m_total_time

double* polyfem::utils::Timer::m_total_time = nullptr
protected

Definition at line 116 of file Timer.hpp.

Referenced by stop().


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