ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
fps_counter_s Struct Reference

Per-renderer timing state for the on-screen FPS overlay. More...

Data Fields

bool visible
unsigned int effective_fps
int last_fps
bool measuring
bool written
bool failed
uint64_t current_frame_id
uint64_t completed_frame_id
uint64_t write_start
uint64_t frame_write_ns
uint64_t report_start
uint64_t report_writes
uint64_t report_frames
uint64_t frame_times [30]
 Circular buffer of timestamps (ns).
int head
 Current write position (0 to FPS_WINDOW_SIZE-1).
int count
 Number of valid entries in buffer (0 to FPS_WINDOW_SIZE).

Detailed Description

Per-renderer timing state for the on-screen FPS overlay.

Per-renderer timing state for the on-screen FPS overlay

Tracks visibility, the frame currently being measured, write completion and failure state, plus monotonic timestamps used to calculate the rolling FPS value and periodically report render timing. The timestamp ring and this state belong to one renderer thread and are hidden behind fps_counter_t.

Definition at line 28 of file fps_counter.c.

Field Documentation

◆ completed_frame_id

uint64_t fps_counter_s::completed_frame_id

Definition at line 35 of file fps_counter.c.

Referenced by fps_counter_frame_begin_id(), and fps_counter_frame_end().

◆ count

int fps_counter_s::count

Number of valid entries in buffer (0 to FPS_WINDOW_SIZE).

Definition at line 43 of file fps_counter.c.

Referenced by fps_counter_create(), fps_counter_get_at(), fps_counter_reset(), and fps_counter_tick_at().

◆ current_frame_id

uint64_t fps_counter_s::current_frame_id

◆ effective_fps

unsigned int fps_counter_s::effective_fps

◆ failed

bool fps_counter_s::failed

◆ frame_times

uint64_t fps_counter_s::frame_times[30]

Circular buffer of timestamps (ns).

Definition at line 41 of file fps_counter.c.

Referenced by fps_counter_create(), fps_counter_get_at(), fps_counter_reset(), and fps_counter_tick_at().

◆ frame_write_ns

uint64_t fps_counter_s::frame_write_ns

◆ head

int fps_counter_s::head

Current write position (0 to FPS_WINDOW_SIZE-1).

Definition at line 42 of file fps_counter.c.

Referenced by fps_counter_create(), fps_counter_get_at(), fps_counter_reset(), and fps_counter_tick_at().

◆ last_fps

int fps_counter_s::last_fps

◆ measuring

◆ report_frames

uint64_t fps_counter_s::report_frames

Definition at line 40 of file fps_counter.c.

Referenced by fps_counter_frame_end(), and fps_counter_render().

◆ report_start

uint64_t fps_counter_s::report_start

Definition at line 38 of file fps_counter.c.

Referenced by fps_counter_create(), and fps_counter_render().

◆ report_writes

uint64_t fps_counter_s::report_writes

Definition at line 39 of file fps_counter.c.

Referenced by fps_counter_frame_end(), and fps_counter_render().

◆ visible

bool fps_counter_s::visible

Definition at line 29 of file fps_counter.c.

Referenced by fps_counter_render(), and fps_counter_set_visible().

◆ write_start

uint64_t fps_counter_s::write_start

Definition at line 36 of file fps_counter.c.

Referenced by fps_counter_write_begin(), and fps_counter_write_end().

◆ written

bool fps_counter_s::written

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