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.h
Go to the documentation of this file.
1
29
30#pragma once
31
32#include <stdbool.h>
33#include <stdint.h>
34
41
52
58
66void fps_counter_tick(fps_counter_t *counter);
67
78float fps_counter_get(fps_counter_t *counter);
79
81void fps_counter_reset(fps_counter_t *counter);
82
85float fps_counter_get_at(fps_counter_t *counter, uint64_t now);
86
90void fps_counter_set_effective_fps(fps_counter_t *counter, unsigned int fps);
91void fps_counter_frame_begin(fps_counter_t *counter, bool measure);
93void fps_counter_write_end(fps_counter_t *counter, bool complete);
97void fps_counter_render(fps_counter_t *counter, int fd, int columns, bool redrawn);
98
100
102bool fps_counter_frame_begin_id(fps_counter_t *counter, uint64_t frame_id);
bool fps_counter_frame_begin_id(fps_counter_t *counter, uint64_t frame_id)
unsigned long long uint64_t
Definition common.h:63
void fps_counter_reset(fps_counter_t *counter)
Definition fps_counter.c:82
void fps_counter_frame_begin(fps_counter_t *counter, bool measure)
void fps_counter_frame_end(fps_counter_t *counter, uint64_t now)
void fps_counter_write_begin(fps_counter_t *counter)
float fps_counter_get(fps_counter_t *counter)
Get the current FPS value.
void fps_counter_tick(fps_counter_t *counter)
Record a frame timestamp.
Definition fps_counter.c:78
void fps_counter_set_effective_fps(fps_counter_t *counter, unsigned int fps)
float fps_counter_get_at(fps_counter_t *counter, uint64_t now)
bool fps_counter_set_visible(fps_counter_t *counter, bool visible)
void fps_counter_destroy(fps_counter_t *counter)
Destroy FPS counter and free resources.
Definition fps_counter.c:68
void fps_counter_tick_at(fps_counter_t *counter, uint64_t now)
Definition fps_counter.c:89
void fps_counter_render(fps_counter_t *counter, int fd, int columns, bool redrawn)
void fps_counter_write_end(fps_counter_t *counter, bool complete)
struct fps_counter_s fps_counter_t
Opaque FPS counter handle.
Definition fps_counter.h:40
fps_counter_t * fps_counter_create(void)
Create a new FPS counter.
Definition fps_counter.c:50
Per-renderer timing state for the on-screen FPS overlay.
Definition fps_counter.c:28