OpenTTD Source: anonymous_namespace{framerate_gui.cpp} Namespace Reference

OpenTTD Source 15.3

Data Structures | Variables
anonymous_namespace{framerate_gui.cpp} Namespace Reference

Private declarations for performance measurement implementation. More...

## Data Structures
struct | PerformanceData

## Variables
const int | NUM_FRAMERATE_POINTS = 512
| Number of data points to keep in buffer for each performance measurement.
const TimingMeasurement | TIMESTAMP_PRECISION = 1000000
| Units a second is divided into in performance measurements
static const double | GL_RATE = 1000.0 / MILLISECONDS_PER_TICK
| Game loop rate, cycles per second
PerformanceData | _pf_data [PFE_MAX]
| Storage for all performance element measurements.

## Detailed Description

Private declarations for performance measurement implementation.

## Variable Documentation

## ◆ _pf_data

PerformanceData anonymous_namespace{framerate_gui.cpp}::_pf_data[PFE_MAX]

Storage for all performance element measurements.

Elements are initialized with the expected rate in recorded values per second.

Definition at line 196 of file framerate_gui.cpp.

Referenced by ConPrintFramerate(), FramerateWindow::DrawElementTimesColumn(), FramerateWindow::DrawWidget(), FrametimeGraphWindow::DrawWidget(), FramerateWindow::OnClick(), ProcessPendingPerformanceMeasurements(), FrametimeGraphWindow::UpdateScale(), and FramerateWindow::UpdateWidgetSize().

## ◆ GL_RATE

const double anonymous_namespace{framerate_gui.cpp}::GL_RATE = 1000.0 / MILLISECONDS_PER_TICK
| static

Game loop rate, cycles per second

Definition at line 189 of file framerate_gui.cpp.

## ◆ NUM_FRAMERATE_POINTS

const int anonymous_namespace{framerate_gui.cpp}::NUM_FRAMERATE_POINTS = 512

Number of data points to keep in buffer for each performance measurement.

Definition at line 50 of file framerate_gui.cpp.

Referenced by anonymous_namespace{framerate_gui.cpp}::PerformanceData::Add(), anonymous_namespace{framerate_gui.cpp}::PerformanceData::AddPause(), anonymous_namespace{framerate_gui.cpp}::PerformanceData::BeginAccumulate(), ConPrintFramerate(), FrametimeGraphWindow::DrawWidget(), anonymous_namespace{framerate_gui.cpp}::PerformanceData::GetAverageDurationMilliseconds(), anonymous_namespace{framerate_gui.cpp}::PerformanceData::GetRate(), FramerateWindow::GetWidgetString(), and FrametimeGraphWindow::UpdateScale().

## ◆ TIMESTAMP_PRECISION

const TimingMeasurement anonymous_namespace{framerate_gui.cpp}::TIMESTAMP_PRECISION = 1000000

Units a second is divided into in performance measurements

Definition at line 52 of file framerate_gui.cpp.

Referenced by FrametimeGraphWindow::DrawWidget(), anonymous_namespace{framerate_gui.cpp}::PerformanceData::GetAverageDurationMilliseconds(), anonymous_namespace{framerate_gui.cpp}::PerformanceData::GetRate(), and FrametimeGraphWindow::UpdateScale().