Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
IntervalLimiter Class Reference

#include <numeric.h>

Public Member Functions

 IntervalLimiter ()=default
 
bool step (float dtime, float wanted_interval)
 

Private Attributes

float m_accumulator = 0.0f
 

Constructor & Destructor Documentation

◆ IntervalLimiter()

IntervalLimiter::IntervalLimiter ( )
default

Member Function Documentation

◆ step()

bool IntervalLimiter::step ( float dtime,
float wanted_interval )
inline
Parameters
dtimetime from last call to this method
wanted_intervalinterval wanted
Returns
true if action should be done

References m_accumulator.

Referenced by Server::AsyncRunStep(), dedicated_server_loop(), Client::step(), ClientEnvironment::step(), PlayerSAO::step(), ServerEnvironment::step(), ParticleManager::stepBuffers(), and Game::updateProfilers().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_accumulator

float IntervalLimiter::m_accumulator = 0.0f
private

Referenced by step().


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