AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
MetricStopWatch< LoggerType > Class Template Reference

#include "Metric.h"

Public Member Functions

 MetricStopWatch (LoggerType &&loggerFunc)
 
 ~MetricStopWatch ()
 

Private Attributes

LoggerType _logger
 
TimePoint _startTime
 

Detailed Description

template<typename LoggerType>
class MetricStopWatch< LoggerType >

Constructor & Destructor Documentation

◆ MetricStopWatch()

template<typename LoggerType >
MetricStopWatch< LoggerType >::MetricStopWatch ( LoggerType &&  loggerFunc)
inline
136 :
137 _logger(std::forward<LoggerType>(loggerFunc)),
138 _startTime(sMetric->IsEnabled() ? std::chrono::steady_clock::now() : TimePoint())
139 {
140 }
#define sMetric
Definition: Metric.h:130
std::chrono::steady_clock::time_point TimePoint
time_point shorthand typedefs
Definition: Duration.h:69
LoggerType _logger
Definition: Metric.h:149
TimePoint _startTime
Definition: Metric.h:150

◆ ~MetricStopWatch()

template<typename LoggerType >
MetricStopWatch< LoggerType >::~MetricStopWatch ( )
inline

Member Data Documentation

◆ _logger

template<typename LoggerType >
LoggerType MetricStopWatch< LoggerType >::_logger
private

◆ _startTime

template<typename LoggerType >
TimePoint MetricStopWatch< LoggerType >::_startTime
private