OpenTTD Source: TimerGameTick Class Reference

OpenTTD Source 15.0-RC2

Data Structures | Public Types | Static Public Attributes
TimerGameTick Class Reference

Timer that represents the game-ticks. More...

`#include <timer_game_tick.h>`

## Data Structures
struct | TPeriod
struct | TStorage

## Public Types
enum | Priority : uint8_t { NONE , COMPETITOR_TIMEOUT }
using | Ticks = int32_t
| The type to store ticks in.
using | TickCounter = uint64_t
| The type that the tick counter is stored in.
using | TElapsed = uint

## Static Public Attributes
static TickCounter | counter = 0
| Monotonic counter, in ticks, since start of game.

## Detailed Description

Timer that represents the game-ticks.

It will pause when the game is paused.

Note
  Callbacks are executed in the game-thread.

Definition at line 22 of file timer_game_tick.h.

## Member Typedef Documentation

## ◆ TElapsed

using TimerGameTick::TElapsed = uint

Definition at line 55 of file timer_game_tick.h.

## ◆ TickCounter

using TimerGameTick::TickCounter = uint64_t

The type that the tick counter is stored in.

Definition at line 25 of file timer_game_tick.h.

## ◆ Ticks

using TimerGameTick::Ticks = int32_t

The type to store ticks in.

Definition at line 24 of file timer_game_tick.h.

## Member Enumeration Documentation

## ◆ Priority

enum TimerGameTick::Priority : uint8_t

Enumerator
NONE | These timers can be executed in any order; the order is not relevant.

Definition at line 27 of file timer_game_tick.h.

## Field Documentation

## ◆ counter

TimerGameTick::TickCounter TimerGameTick::counter = 0
| static

Monotonic counter, in ticks, since start of game.

Definition at line 60 of file timer_game_tick.h.

Referenced by _GenerateWorld(), AfterLoadGame(), AnimationBase< Tbase, Tspec, Tobj, Textra, GetCallback, Tframehelper >::AnimateTile(), AnimateTile_Town(), Vehicle::BeginLoading(), NewGRFProfiler::BeginResolve(), Gamelog::Change(), TimetableWindow::DrawSummaryPanel(), GenerateDefaultSaveName(), GetDateFromStartTick(), GetGlobalVariable(), GetStartTickFromDate(), Vehicle::IsWaitingForUnbunching(), Vehicle::LeaveStation(), Vehicle::LeaveUnbunchingDepot(), LoadNewGRF(), TimetableWindow::OnQueryTextFinished(), RunTileLoop(), SurveyTimers(), TileLoop_Town(), UpdateVehicleTimetable(), and VehicleEnterDepot().

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

- src/timer/timer_game_tick.h
- src/timer/timer_game_tick.cpp