Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Timer::SimplePrinter Class Reference

Displays the time elapsed between the call to the constructor and the destructor. More...

#include <arcane/core/Timer.h>

Collaboration diagram for Arcane::Timer::SimplePrinter:

Public Member Functions

 SimplePrinter (ITraceMng *tm, const String &msg)
 SimplePrinter (ITraceMng *tm, const String &msg, bool is_active)

Private Member Functions

void _init ()

Private Attributes

ITraceMngm_trace_mng
Real m_begin_time
bool m_is_active
String m_message

Detailed Description

Displays the time elapsed between the call to the constructor and the destructor.

This class allows simply displaying, at the time of the destructor, the real time elapsed since the call to the constructor. The display is done via the info() method of ITraceMng.

{
Timer::SimplePrinter sp(traceMng(),"myFunction");
myFunction();
}
Displays the time elapsed between the call to the constructor and the destructor.
Definition Timer.h:175

Definition at line 174 of file Timer.h.

Constructor & Destructor Documentation

◆ SimplePrinter() [1/2]

Arcane::Timer::SimplePrinter::SimplePrinter ( ITraceMng * tm,
const String & msg )

Definition at line 218 of file Timer.cc.

◆ SimplePrinter() [2/2]

Arcane::Timer::SimplePrinter::SimplePrinter ( ITraceMng * tm,
const String & msg,
bool is_active )

Definition at line 231 of file Timer.cc.

◆ ~SimplePrinter()

Arcane::Timer::SimplePrinter::~SimplePrinter ( )

Definition at line 244 of file Timer.cc.

Member Function Documentation

◆ _init()

void Arcane::Timer::SimplePrinter::_init ( )
private

Definition at line 257 of file Timer.cc.

Member Data Documentation

◆ m_begin_time

Real Arcane::Timer::SimplePrinter::m_begin_time
private

Definition at line 185 of file Timer.h.

◆ m_is_active

bool Arcane::Timer::SimplePrinter::m_is_active
private

Definition at line 186 of file Timer.h.

◆ m_message

String Arcane::Timer::SimplePrinter::m_message
private

Definition at line 187 of file Timer.h.

◆ m_trace_mng

ITraceMng* Arcane::Timer::SimplePrinter::m_trace_mng
private

Definition at line 184 of file Timer.h.


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