Minetest  5.4.0
TimeTaker Class Reference

#include <timetaker.h>

+ Collaboration diagram for TimeTaker:

Public Member Functions

 TimeTaker (const std::string &name, u64 *result=nullptr, TimePrecision prec=PRECISION_MILLI)
 
 ~TimeTaker ()
 
u64 stop (bool quiet=false)
 
u64 getTimerTime ()
 

Private Attributes

std::string m_name
 
u64 m_time1
 
bool m_running = true
 
TimePrecision m_precision
 
u64 * m_result = nullptr
 

Constructor & Destructor Documentation

◆ TimeTaker()

TimeTaker::TimeTaker ( const std::string &  name,
u64 *  result = nullptr,
TimePrecision  prec = PRECISION_MILLI 
)

References porting::getTime(), m_name, m_precision, m_result, and m_time1.

+ Here is the call graph for this function:

◆ ~TimeTaker()

TimeTaker::~TimeTaker ( )
inline

References stop().

+ Here is the call graph for this function:

Member Function Documentation

◆ getTimerTime()

u64 TimeTaker::getTimerTime ( )

References porting::getTime(), m_precision, and m_time1.

Referenced by ClientMap::renderMap(), ClientLauncher::speed_tests(), and ServerEnvironment::step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stop()

u64 TimeTaker::stop ( bool  quiet = false)

References porting::getTime(), infostream, m_name, m_precision, m_result, m_running, and m_time1.

Referenced by ScopeProfiler::~ScopeProfiler(), ~TimeTaker(), ClientMap::renderMap(), ClientLauncher::speed_tests(), ServerEnvironment::step(), and Game::updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_name

std::string TimeTaker::m_name
private

Referenced by TimeTaker(), and stop().

◆ m_precision

TimePrecision TimeTaker::m_precision
private

Referenced by TimeTaker(), getTimerTime(), and stop().

◆ m_result

u64* TimeTaker::m_result = nullptr
private

Referenced by TimeTaker(), and stop().

◆ m_running

bool TimeTaker::m_running = true
private

Referenced by stop().

◆ m_time1

u64 TimeTaker::m_time1
private

Referenced by TimeTaker(), getTimerTime(), and stop().


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