OpenTTD Source 20241224-master-gf74b0cf984
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)
 

Data Fields

Statestate
 
std::chrono::high_resolution_clock::time_point chrono_start
 real time count.
 

Detailed Description

TicToc profiling.

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

Definition at line 68 of file debug.h.

Constructor & Destructor Documentation

◆ TicToc()

TicToc::TicToc ( State state)
inline

Definition at line 82 of file debug.h.

◆ ~TicToc()

TicToc::~TicToc ( )
inline

Definition at line 84 of file debug.h.

Field Documentation

◆ chrono_start

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

real time count.

Definition at line 80 of file debug.h.

◆ state

State& TicToc::state

Definition at line 79 of file debug.h.


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