Patch - Doc Update - V12.8.1

This commit is contained in:
2025-07-28 17:37:15 +02:00
parent 9431552316
commit ccd0d045f9
201 changed files with 9244 additions and 3316 deletions

View File

@@ -3,10 +3,19 @@
class fps_limiter {
public:
/**
* Builder for fps_limiter class
* This class is used to limit the execution rate of a loop based on a target frames per second (FPS).
* @param target_fps Target frames per second for the limiter. The default is 60.0f FPS.
*/
explicit fps_limiter(const float target_fps = 60.0f)
: min_delta_(1.0f / target_fps), last_time_(std::chrono::high_resolution_clock::now()) {}
// Retourne true si la fonction peut etre executee
/**
* Function to check if enough time has passed since the last execution.
* @return True if the time since the last call is greater than or equal to the minimum delta time, otherwise false.
*/
bool should_run() {
const auto now = std::chrono::high_resolution_clock::now();
if (const float elapsed = std::chrono::duration<float>(now - last_time_).count(); elapsed >= min_delta_) {