OpenTTD Source: TicToc Struct Reference

OpenTTD Source 15.0-RC2

Data Structures | Public Member Functions | Static Public Member Functions | Data Fields
TicToc Struct Reference

TicToc profiling. More...

`#include <debug.h>`

## Data Structures
struct | State
| Persistent state for TicToc profiling. More...

## Public Member Functions
| TicToc (State &state)

## Static Public Member Functions
static void | Tick (const std::string_view prefix)

## Data Fields
State & | state
std::chrono::high_resolution_clock::time_point | chrono_start
| real time count.

## Detailed Description

TicToc profiling.

Usage for max_count based output: static TicToc::State state("A name", 1); TicToc tt(state); –Do your code–

Usage for per-tick output: static TicToc::State state("A name"); TicToc tt(state); –Do your code–

Definition at line 74 of file debug.h.

## Constructor & Destructor Documentation

## ◆ TicToc()

TicToc::TicToc | ( | State & | state | ) |
| inline

Definition at line 112 of file debug.h.

## ◆ ~TicToc()

TicToc::~TicToc | ( |  | ) |
| inline

Definition at line 114 of file debug.h.

## Member Function Documentation

## ◆ Tick()

static void TicToc::Tick | ( | const std::string_view | prefix | ) |
| inlinestatic

Definition at line 123 of file debug.h.

## Field Documentation

## ◆ chrono_start

std::chrono::high_resolution_clock::time_point TicToc::chrono_start

real time count.

Definition at line 110 of file debug.h.

## ◆ state

State& TicToc::state

Definition at line 109 of file debug.h.

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

- src/debug.h