OmniSciDB  b24e664e58
 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 284 of file Logger.h.

Constructor & Destructor Documentation

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

Definition at line 551 of file Logger.cpp.

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

Definition at line 554 of file Logger.cpp.

References stop().

554  {
555  stop();
556 }

+ Here is the call graph for this function:

Member Function Documentation

void logger::DebugTimer::stop ( )

Definition at line 558 of file Logger.cpp.

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

Referenced by ~DebugTimer().

558  {
559  if (duration_) {
560  if (duration_->stop()) {
561  logAndEraseDurationTree(std::this_thread::get_id());
562  }
563  duration_ = nullptr;
564  }
565 }
void logAndEraseDurationTree(std::thread::id const thread_id)
Definition: Logger.cpp:539
Duration * duration_
Definition: Logger.h:285

+ 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 285 of file Logger.h.

Referenced by stop().


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