Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::CodeBlockTimer Class Reference

#include <Timer.h>

Public Member Functions

 CodeBlockTimer ()=delete
 
 CodeBlockTimer (const std::string &name, std::ostream &output)
 Instantiate the object and start the timer.
 
 ~CodeBlockTimer ()
 Calculate and output to a stream the elapsed wall-clock time (sec)
 

Private Attributes

std::string m_name
 
std::ostream & m_out
 
std::chrono::time_point< std::chrono::system_clock > m_start
 

Detailed Description

Definition at line 43 of file Timer.h.

Constructor & Destructor Documentation

◆ CodeBlockTimer() [1/2]

Mantid::Kernel::CodeBlockTimer::CodeBlockTimer ( )
delete

◆ CodeBlockTimer() [2/2]

Mantid::Kernel::CodeBlockTimer::CodeBlockTimer ( const std::string &  name,
std::ostream &  out 
)

Instantiate the object and start the timer.

Parameters
name:: custom name of the code block
out:: stream to output the elapsed wall-clock time

Definition at line 68 of file Timer.cpp.

◆ ~CodeBlockTimer()

Mantid::Kernel::CodeBlockTimer::~CodeBlockTimer ( )

Calculate and output to a stream the elapsed wall-clock time (sec)

Definition at line 73 of file Timer.cpp.

References m_name, m_out, and m_start.

Member Data Documentation

◆ m_name

std::string Mantid::Kernel::CodeBlockTimer::m_name
private

Definition at line 50 of file Timer.h.

Referenced by ~CodeBlockTimer().

◆ m_out

std::ostream& Mantid::Kernel::CodeBlockTimer::m_out
private

Definition at line 51 of file Timer.h.

Referenced by ~CodeBlockTimer().

◆ m_start

std::chrono::time_point<std::chrono::system_clock> Mantid::Kernel::CodeBlockTimer::m_start
private

Definition at line 52 of file Timer.h.

Referenced by ~CodeBlockTimer().


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