Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
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 Member Functions

void start ()
 

Private Attributes

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

Constructor & Destructor Documentation

◆ TimeTaker()

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

References m_name, m_precision, m_result, and start().

+ 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 ServerEnvironment::step().

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

◆ start()

void TimeTaker::start ( )
private

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

Referenced by TimeTaker().

+ 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, m_time1, and TimePrecision_units.

Referenced by ~TimeTaker(), Game::drawScene(), ClientMap::renderMap(), ClientMap::renderMapShadows(), 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(), start(), 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 getTimerTime(), start(), and stop().


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