ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
adaptive_sleep_state_t Struct Reference

Runtime state for adaptive sleep. More...

#include <lib/util/time.h>

Data Fields

adaptive_sleep_config_t config
 Configuration (copied, not referenced)
 
double current_speed_multiplier
 Current speed state (1.0 = baseline, >1.0 = faster)
 
uint64_t last_sleep_ns
 Last calculated sleep time (for debugging)
 

Detailed Description

Runtime state for adaptive sleep.

Tracks current speed multiplier and last calculated sleep time. Should be initialized once and updated each iteration.

Definition at line 310 of file time.h.

Field Documentation

◆ config

adaptive_sleep_config_t adaptive_sleep_state_t::config

Configuration (copied, not referenced)

Definition at line 311 of file time.h.

Referenced by adaptive_sleep_calculate(), and adaptive_sleep_init().

◆ current_speed_multiplier

double adaptive_sleep_state_t::current_speed_multiplier

Current speed state (1.0 = baseline, >1.0 = faster)

Definition at line 312 of file time.h.

Referenced by adaptive_sleep_calculate(), and adaptive_sleep_init().

◆ last_sleep_ns

uint64_t adaptive_sleep_state_t::last_sleep_ns

Last calculated sleep time (for debugging)

Definition at line 313 of file time.h.

Referenced by adaptive_sleep_calculate(), and adaptive_sleep_init().


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