OmniSciDB  addbbd5075
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
logger::DebugTimer Class Reference

#include <Logger.h>

+ Collaboration diagram for logger::DebugTimer:

Public Member Functions

 DebugTimer (Severity, char const *file, int line, char const *name)
 
 ~DebugTimer ()
 
void stop ()
 

Private Attributes

Durationduration_
 

Detailed Description

Definition at line 287 of file Logger.h.

Constructor & Destructor Documentation

logger::DebugTimer::DebugTimer ( Severity  severity,
char const *  file,
int  line,
char const *  name 
)

Definition at line 558 of file Logger.cpp.

559  : duration_(newDuration(severity, file, line, name)) {}
Duration * duration_
Definition: Logger.h:288
Duration * newDuration(Severity severity, Ts &&...args)
Definition: Logger.cpp:486
logger::DebugTimer::~DebugTimer ( )

Definition at line 561 of file Logger.cpp.

References stop().

561  {
562  stop();
563 }

+ Here is the call graph for this function:

Member Function Documentation

void logger::DebugTimer::stop ( )

Definition at line 565 of file Logger.cpp.

References duration_, logger::logAndEraseDurationTree(), and logger::Duration::stop().

Referenced by ~DebugTimer().

565  {
566  if (duration_) {
567  if (duration_->stop()) {
568  logAndEraseDurationTree(std::this_thread::get_id());
569  }
570  duration_ = nullptr;
571  }
572 }
void logAndEraseDurationTree(std::thread::id const thread_id)
Definition: Logger.cpp:546
Duration * duration_
Definition: Logger.h:288

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Duration* logger::DebugTimer::duration_
private

Definition at line 288 of file Logger.h.

Referenced by stop().


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