#ifndef ASCII3D_TIMING_H #define ASCII3D_TIMING_H #ifdef __cplusplus extern "C" { #endif // Returns the monotonic wall clock time in seconds, suitable for frame timing. double timing_get_seconds(void); // Microsecond-scale thread suspension layer. void timing_sleep_us(unsigned int microseconds); // Calculates dynamic sleep padding against a target FPS to prevent high CPU // utilization void timing_limit_fps(double frame_start_time, int target_fps); #ifdef __cplusplus } #endif #endif