Xrb::FramerateCalculator Class Reference

A circular queue storing frame durations in order to calculate framerates. More...

#include <xrb_frameratecalculator.hpp>

List of all members.

Public Member Functions

 FramerateCalculator (Float time_unit_conversion_ratio=1.0)
 Constructs a framerate calculator with the given time unit conversion ratio.
 ~FramerateCalculator ()
 Destructor. Boring.
void AddFrameTime (Float frame_time)
 Records the duration of a new frame.
Float Framerate () const
 Calculates and returns the current framerate, multiplied by the time unit conversion ratio.


Detailed Description

A circular queue storing frame durations in order to calculate framerates.

The default queue size is 32, providing a more or less instantaneous framerate (unless frames are being rendered very slowly).

Definition at line 26 of file xrb_frameratecalculator.hpp.


Constructor & Destructor Documentation

Xrb::FramerateCalculator::FramerateCalculator ( Float  time_unit_conversion_ratio = 1.0  ) 

Constructs a framerate calculator with the given time unit conversion ratio.

The time unit conversion ratio is simply multiplied into the calculated framerate before returning it, in Framerate.

Definition at line 16 of file xrb_frameratecalculator.cpp.


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

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8