ScopedTimer Class Reference#

DiFfRG: DiFfRG::ScopedTimer Class Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::ScopedTimer Class Reference

Adds the wall time of its scope to a double, in seconds. More...

#include <output_timings.hh>

Public Member Functions

 ScopedTimer (double &sink)
 
 ScopedTimer (double *sink)
 
 ~ScopedTimer ()
 
 ScopedTimer (const ScopedTimer &)=delete
 
ScopedTimer & operator= (const ScopedTimer &)=delete
 
void stop ()
 

Private Attributes

double * sink
 
std::chrono::steady_clock::time_point start
 

Detailed Description

Adds the wall time of its scope to a double, in seconds.

Deliberately not deal.II's Timer (which is heavier and tied to MPI) nor the timesteppers' CalcDtTimer (which is stateful and millisecond-granular).

Constructor & Destructor Documentation

◆ ScopedTimer() [1/3]

DiFfRG::ScopedTimer::ScopedTimer ( double & sink)
inlineexplicit

◆ ScopedTimer() [2/3]

DiFfRG::ScopedTimer::ScopedTimer ( double * sink)
inlineexplicit

A null sink measures nothing, for call paths that may run without a timing target.

◆ ~ScopedTimer()

DiFfRG::ScopedTimer::~ScopedTimer ( )
inline

◆ ScopedTimer() [3/3]

DiFfRG::ScopedTimer::ScopedTimer ( const ScopedTimer & )
delete

Member Function Documentation

◆ operator=()

ScopedTimer & DiFfRG::ScopedTimer::operator= ( const ScopedTimer & )
delete

◆ stop()

void DiFfRG::ScopedTimer::stop ( )
inline

Charge the elapsed time now instead of at scope exit. Idempotent.

Member Data Documentation

◆ sink

double* DiFfRG::ScopedTimer::sink
private

◆ start

std::chrono::steady_clock::time_point DiFfRG::ScopedTimer::start
private

The documentation for this class was generated from the following file:
  • /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/data/output_timings.hh